diff options
author | Martijn Hoekstra <martijnhoekstra@gmail.com> | 2014-02-03 13:17:19 +0100 |
---|---|---|
committer | Martijn Hoekstra <martijnhoekstra@gmail.com> | 2014-02-03 13:17:19 +0100 |
commit | 50d7ae3c79b4bbcca7f725134486641279ab8ee8 (patch) | |
tree | 987e1d9c6608a6c587534f988e931bd3fef485e0 /src/test/scala/spray | |
parent | 8a83cfb1e72d56045c1977ec72aa748645dae9cd (diff) | |
download | spray-json-50d7ae3c79b4bbcca7f725134486641279ab8ee8.tar.gz spray-json-50d7ae3c79b4bbcca7f725134486641279ab8ee8.tar.bz2 spray-json-50d7ae3c79b4bbcca7f725134486641279ab8ee8.zip |
add test case for all slash posibilities
Diffstat (limited to 'src/test/scala/spray')
-rw-r--r-- | src/test/scala/spray/json/JsonParserSpec.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/scala/spray/json/JsonParserSpec.scala b/src/test/scala/spray/json/JsonParserSpec.scala index a813c68..c6c1589 100644 --- a/src/test/scala/spray/json/JsonParserSpec.scala +++ b/src/test/scala/spray/json/JsonParserSpec.scala @@ -50,6 +50,9 @@ class JsonParserSpec extends Specification { JsonParser(""""\"\\/\b\f\n\r\t"""") mustEqual JsString("\"\\/\b\f\n\r\t") JsonParser("\"L\\" + "u00e4nder\"") mustEqual JsString("Länder") } + "parse all representations of the slash (SOLIDUS) character in a JsString" in { + JsonParser( "\"" + "/\\/\\u002f" + "\"") mustEqual JsString("///") + } "properly parse a simple JsObject" in ( JsonParser(""" { "key" :42, "key2": "value" }""") mustEqual JsObject("key" -> JsNumber(42), "key2" -> JsString("value")) |