# HG changeset patch # User Sergey Kandaurov # Date 1483531158 -10800 # Node ID 4b0b10e39a08f8ecb340db4cf4e9e2e546e91fef # Parent a073a545413d69deddd8765d55f73cf43c44e6b7 Tests: fixed implicitly declared njs variables after 4337ed48d6d6. diff --git a/js.t b/js.t --- a/js.t +++ b/js.t @@ -141,8 +141,7 @@ EOF } function test_ihdr(req, res) { - var s; - s = ''; + var s = '', h; for (h in req.headers) { if (h.substr(0, 3) == 'foo') { s += req.headers[h]; @@ -156,8 +155,7 @@ EOF } function test_iarg(req, res) { - var s; - s = ''; + var s = '', a; for (a in req.args) { if (a.substr(0, 3) == 'foo') { s += req.args[a]; @@ -233,7 +231,7 @@ EOF res.headers['a'] = req.args.a; res.headers['b'] = req.args.b; - s = ''; + var s = '', h; for (h in res.headers) { s += res.headers[h]; }