Commit cdb39ed8 authored by Jamie A. Jennings's avatar Jamie A. Jennings

Merged branch with fix for unit tests of locals in files that do not declare packages

parents b24c5bb8 68c00203
......@@ -738,4 +738,19 @@ results_txt = table.concat(results, '\n')
check(results_txt:find('"data": "a/b/c"', 1, true))
-- Version 1.1.1 fixed a bug in unit testing of local definitions in a file that
-- does NOT declare a package
cmd = rosie_cmd .. ' --norcfile test ' .. TEST_HOME .. '/unit-test-no-pkg.rpl'
results, status, code = util.os_execute_capture(cmd, nil)
check(#results>0, "command should have produced output")
if not check(code == 0, "exit status differs from expected") then
print("Command was:", cmd)
results_txt = table.concat(results, '\n')
return test.finish()
-- TESTING A FIX MADE IN Rosie v1.1.1
local foo = "foo"
local foo2 = foo foo
bar = foo foo
-- Each of the tests below should succeed
-- test local foo accepts "foo"
-- test local foo rejects "foooo"
-- test bar accepts "foo foo"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment