Skip to content

Commit 5284500

Browse files
committed
test: restore array_mt round-trip case in TEST 6
1 parent 6a0aba4 commit 5284500

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

t/core/json.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,15 @@ qr/\{"b":\{"a":\{"b":"table: 0x[\w]+"\}\}\}/
122122
local core = require("apisix.core")
123123
local data = core.json.decode('{"arr":[]}')
124124
ngx.say(core.json.encode(data))
125+
local data = { arr = setmetatable({}, core.json.array_mt)}
126+
ngx.say(core.json.encode(data))
125127
local data = core.json.decode('{"obj":{}}')
126128
ngx.say(core.json.encode(data))
127129
}
128130
}
129131
--- response_body
130132
{"arr":[]}
133+
{"arr":[]}
131134
{"obj":{}}
132135
133136

0 commit comments

Comments
 (0)