Skip to content

Commit bf03e0d

Browse files
committed
Add more tests to confirm that smart quote escape is correct
1 parent 43d5331 commit bf03e0d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/Main.hs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ tests = testGroup "Tests"
109109
case J.decode enc of
110110
Left e -> QC.counterexample (show e) False
111111
Right val1 -> val0 === val1
112+
, THU.testCase "Q" $
113+
-- Test that Unicode <right single quotation mark> is decoded correctly.
114+
Right (J.String "It\2019s over now")
115+
@=?
116+
J.decode (shortTextToBytes "\"It\2019s over now\"")
117+
, THU.testCase "R" $
118+
-- Test that Unicode <right single quotation mark> is encoded correctly.
119+
shortTextToBytes "\"It\2019s over now\""
120+
@=?
121+
BChunks.concat (Builder.run 4 (J.encode (J.String "It\2019s over now")))
112122
]
113123
, testGroup "smile-fragment"
114124
[ THU.testCase "biginteger-65535" $

0 commit comments

Comments
 (0)