1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Add test for toc summaries of files with unicode chars

This commit is contained in:
Timothy Clem 2017-02-16 08:29:49 -08:00
parent dbe08e5f81
commit 7b9d4b1f1b
3 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,4 @@
#
# RIGHT SINGLE QUOTATION MARK
# Unicode: U+2019, UTF-8: E2 80 99
""

View File

@ -0,0 +1,7 @@
#
# RIGHT SINGLE QUOTATION MARK
# Unicode: U+2019, UTF-8: E2 80 99
""
def foo(a, b, c)
end