diff options
author | Yichun Zhang (agentzh) <agentzh@gmail.com> | 2014-03-31 16:44:59 -0700 |
---|---|---|
committer | Yichun Zhang (agentzh) <agentzh@gmail.com> | 2014-03-31 16:44:59 -0700 |
commit | afcb87695c7e7c8a92d0a1452bdf02f82d0290fb (patch) | |
tree | 5d0b74a43763e94397b84c2bc476422a70f5fe52 | |
parent | cdb1a73615415e88ac8ef1b2eeec216fe72b9794 (diff) | |
download | lua-cjson-afcb87695c7e7c8a92d0a1452bdf02f82d0290fb.tar.gz lua-cjson-afcb87695c7e7c8a92d0a1452bdf02f82d0290fb.tar.bz2 lua-cjson-afcb87695c7e7c8a92d0a1452bdf02f82d0290fb.zip |
added one passing test.
-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 | |||