# HG changeset patch # User Anton Shestakov # Date 1469275973 -28800 # Node ID ea58c0fe1cd7362f79b85af7894a0e4209587f33 # Parent 8a6c7c4b15fb8e86b8112d33a810d17703fab72d test_util_http: wrap individual test blocks in do-end [luacheck] diff -r 8a6c7c4b15fb -r ea58c0fe1cd7 tests/test_util_http.lua --- a/tests/test_util_http.lua Sat Jul 23 18:22:05 2016 +0800 +++ b/tests/test_util_http.lua Sat Jul 23 20:12:53 2016 +0800 @@ -25,13 +25,17 @@ 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