Commit 68c00203 authored by Jamie A. Jennings's avatar Jamie A. Jennings

Added a test for the cli unit test on local patterns in files that do not declare a package.

parent b26303f5
......@@ -737,4 +737,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