diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-07 11:22:07 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-07 19:27:37 -0300 |
commit | 1dcdaa77c0a52ad02f49bc7fdde2fd7dee956ddf (patch) | |
tree | 30a6e8dbabc0e36b3a9ff25dfde2fa60327ae402 /spec/test_spec.lua | |
parent | 5bff41c6b4adac49c0456f125c9f208b0a429d86 (diff) | |
download | luarocks-1dcdaa77c0a52ad02f49bc7fdde2fd7dee956ddf.tar.gz luarocks-1dcdaa77c0a52ad02f49bc7fdde2fd7dee956ddf.tar.bz2 luarocks-1dcdaa77c0a52ad02f49bc7fdde2fd7dee956ddf.zip |
Tests: test the "busted" backend of `luarocks test` with a local fixture
Diffstat (limited to 'spec/test_spec.lua')
-rw-r--r-- | spec/test_spec.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/test_spec.lua b/spec/test_spec.lua index f0ec25ce..a2e1989d 100644 --- a/spec/test_spec.lua +++ b/spec/test_spec.lua | |||
@@ -39,16 +39,17 @@ describe("luarocks test #blackbox #b_test", function() | |||
39 | finally(function() | 39 | finally(function() |
40 | -- delete downloaded and unpacked files | 40 | -- delete downloaded and unpacked files |
41 | lfs.chdir(testing_paths.testrun_dir) | 41 | lfs.chdir(testing_paths.testrun_dir) |
42 | test_env.remove_dir("luassert-1.7.10-0") | 42 | test_env.remove_dir("busted_project-0.1-1") |
43 | os.remove("luassert-1.7.10-0.rockspec") | 43 | os.remove("busted_project-0.1-1.src.rock") |
44 | end) | 44 | end) |
45 | 45 | ||
46 | -- make luassert | 46 | -- make luassert |
47 | assert.is_true(run.luarocks_bool("download --rockspec luassert 1.7.10-0")) | 47 | assert.is_true(run.luarocks_bool("download --server="..testing_paths.fixtures_repo_dir.." busted_project 0.1-1")) |
48 | assert.is_true(run.luarocks_bool("unpack luassert-1.7.10-0.rockspec")) | 48 | assert.is_true(run.luarocks_bool("unpack busted_project-0.1-1.src.rock")) |
49 | lfs.chdir("luassert-1.7.10-0/luassert-1.7.10/") | 49 | lfs.chdir("busted_project-0.1-1/busted_project") |
50 | assert.is_true(run.luarocks_bool("make")) | 50 | assert.is_true(run.luarocks_bool("make")) |
51 | local output = run.luarocks("test --test-type=busted luassert-1.7.10-0.rockspec") | 51 | local output = run.luarocks("test") |
52 | print(output) | ||
52 | -- Assert that busted ran, whether successfully or not | 53 | -- Assert that busted ran, whether successfully or not |
53 | assert.match("%d+ success.* / %d+ failure.* / %d+ error.* / %d+ pending", output) | 54 | assert.match("%d+ success.* / %d+ failure.* / %d+ error.* / %d+ pending", output) |
54 | end) | 55 | end) |