Skip to content

Commit

Permalink
test: fix undeclared var error in strict mode
Browse files Browse the repository at this point in the history
Fixes #44
  • Loading branch information
psergee committed May 11, 2022
1 parent 865bf76 commit 6faa020
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unit/http_template_test.lua
Expand Up @@ -10,6 +10,9 @@ g.test_template_1 = function()
'tmpl1')
end

-- The strict module requires a global variable to be explicitly defined
_G.ab = nil

g.test_template_2 = function()
t.assert_equals(http_lib.template('<% for i = 1, cnt do %> <%= ab %> <% end %>',
{abc = '1 <3>&" ', cnt = 3}),
Expand Down

0 comments on commit 6faa020

Please sign in to comment.