mirror of
https://github.com/github/semantic.git
synced 2024-12-25 16:02:43 +03:00
Add test for toc summaries of files with unicode chars
This commit is contained in:
parent
dbe08e5f81
commit
7b9d4b1f1b
@ -46,6 +46,11 @@ spec = parallel $ do
|
||||
diff <- testDiff sourceBlobs
|
||||
diffTOC sourceBlobs diff `shouldBe` [ JSONSummary $ Summarizable C.Function "performHealthCheck" (sourceSpanBetween (8, 1) (29, 2)) "modified" ]
|
||||
|
||||
it "handles unicode characters in file" $ do
|
||||
sourceBlobs <- blobsForPaths (both "ruby/unicode.A.rb" "ruby/unicode.B.rb")
|
||||
diff <- testDiff sourceBlobs
|
||||
diffTOC sourceBlobs diff `shouldBe` [ JSONSummary $ Summarizable C.Method "foo" (sourceSpanBetween (6, 1) (7, 4)) "added" ]
|
||||
|
||||
prop "only methods and functions are summarized" $
|
||||
\iden body ->
|
||||
let
|
||||
|
4
test/corpus/toc/ruby/unicode.A.rb
Normal file
4
test/corpus/toc/ruby/unicode.A.rb
Normal file
@ -0,0 +1,4 @@
|
||||
# ’
|
||||
# RIGHT SINGLE QUOTATION MARK
|
||||
# Unicode: U+2019, UTF-8: E2 80 99
|
||||
"’"
|
7
test/corpus/toc/ruby/unicode.B.rb
Normal file
7
test/corpus/toc/ruby/unicode.B.rb
Normal file
@ -0,0 +1,7 @@
|
||||
# ’
|
||||
# RIGHT SINGLE QUOTATION MARK
|
||||
# Unicode: U+2019, UTF-8: E2 80 99
|
||||
"’"
|
||||
|
||||
def foo(a, b, c)
|
||||
end
|
Loading…
Reference in New Issue
Block a user