diff options
-rw-r--r-- | tests/agentzh.t | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/agentzh.t b/tests/agentzh.t index aeebd67..e65288f 100644 --- a/tests/agentzh.t +++ b/tests/agentzh.t | |||
@@ -39,3 +39,14 @@ print(cjson.encode({dogs = {}})) | |||
39 | {} | 39 | {} |
40 | {"dogs":{}} | 40 | {"dogs":{}} |
41 | 41 | ||
42 | |||
43 | |||
44 | === TEST 4: & in JSON | ||
45 | --- lua | ||
46 | local cjson = require "cjson" | ||
47 | local a="[\"a=1&b=2\"]" | ||
48 | local b=cjson.decode(a) | ||
49 | print(cjson.encode(b)) | ||
50 | --- out | ||
51 | ["a=1&b=2"] | ||
52 | |||