Encode Unicode. Fix #34

This commit is contained in:
2019-12-20 07:58:09 +01:00
parent 9a5d54c035
commit 1e55f17e7e
2 changed files with 93 additions and 85 deletions

View File

@ -19,3 +19,5 @@ spec = describe "value" $ do
value minified (String "\"") `shouldBe` "\"\\\"\""
it "escapes backspace" $
value minified (String "a\bc") `shouldBe` "\"a\\bc\""
it "escapes Unicode" $
value minified (String "\0") `shouldBe` "\"\\u0000\""