aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_util_http.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-07-23 18:58:58 +0200
committerKim Alvefur <zash@zash.se>2016-07-23 18:58:58 +0200
commit6b59d7d9da7d8ebe92a5f2bf93a76ac98b057241 (patch)
tree5b3d9eec6726161611eafac7f8efdaa3b87d4dff /tests/test_util_http.lua
parent96713c8ff024e30feb1ef77b86542600e8873229 (diff)
parent2c6065e198926e5026d51a2b0effe9223dd2cd01 (diff)
downloadprosody-6b59d7d9da7d8ebe92a5f2bf93a76ac98b057241.tar.gz
prosody-6b59d7d9da7d8ebe92a5f2bf93a76ac98b057241.zip
Merge 0.10->trunk
Diffstat (limited to 'tests/test_util_http.lua')
-rw-r--r--tests/test_util_http.lua20
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