diff options
author | Anton Shestakov <av6@dwimlabs.net> | 2016-07-23 20:12:53 +0800 |
---|---|---|
committer | Anton Shestakov <av6@dwimlabs.net> | 2016-07-23 20:12:53 +0800 |
commit | df7216ceb5cdf8ac50e9d6d4e14fd4efb56b6f9c (patch) | |
tree | cd792f92bfbdfb87944b5e558b02e393b26c97bb /tests/test_util_http.lua | |
parent | 8e2e80c3f3b5330f64ec0cce849a1b6c027fffb2 (diff) | |
download | prosody-df7216ceb5cdf8ac50e9d6d4e14fd4efb56b6f9c.tar.gz prosody-df7216ceb5cdf8ac50e9d6d4e14fd4efb56b6f9c.zip |
test_util_http: wrap individual test blocks in do-end [luacheck]
Diffstat (limited to 'tests/test_util_http.lua')
-rw-r--r-- | tests/test_util_http.lua | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/test_util_http.lua b/tests/test_util_http.lua index a195df6b..d9cc2779 100644 --- a/tests/test_util_http.lua +++ b/tests/test_util_http.lua @@ -25,13 +25,17 @@ function formencode(formencode) end function formdecode(formdecode) - local t = formdecode("one=1&two=2"); - assert_table(t[1]); - assert_equal(t[1].name, "one"); assert_equal(t[1].value, "1"); - assert_table(t[2]); - assert_equal(t[2].name, "two"); assert_equal(t[2].value, "2"); + do + local t = formdecode("one=1&two=2"); + assert_table(t[1]); + assert_equal(t[1].name, "one"); assert_equal(t[1].value, "1"); + assert_table(t[2]); + assert_equal(t[2].name, "two"); assert_equal(t[2].value, "2"); + end - local t = formdecode("one+two=1&two+one%26=2"); - assert_equal(t[1].name, "one two"); assert_equal(t[1].value, "1"); - assert_equal(t[2].name, "two one&"); assert_equal(t[2].value, "2"); + do + local t = formdecode("one+two=1&two+one%26=2"); + assert_equal(t[1].name, "one two"); assert_equal(t[1].value, "1"); + assert_equal(t[2].name, "two one&"); assert_equal(t[2].value, "2"); + end end |