diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2020-02-14 09:53:12 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2020-02-14 09:53:12 -0300 |
commit | bd27d052eaf856bf24c77f556a50b7e19f11cba1 (patch) | |
tree | 9812779fea52afea7dbbf15a21620d3c59102476 /spec | |
parent | ab0d7b2a266ff7f322af93915472f5d80d4be9af (diff) | |
download | luarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.tar.gz luarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.tar.bz2 luarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.zip |
tests: shorter descriptions
Diffstat (limited to 'spec')
-rw-r--r-- | spec/add_spec.lua | 12 | ||||
-rw-r--r-- | spec/deps_spec.lua | 16 | ||||
-rw-r--r-- | spec/dir_spec.lua | 2 | ||||
-rw-r--r-- | spec/doc_spec.lua | 22 | ||||
-rw-r--r-- | spec/download_spec.lua | 10 | ||||
-rw-r--r-- | spec/external_spec.lua | 2 | ||||
-rw-r--r-- | spec/fetch_spec.lua | 2 | ||||
-rw-r--r-- | spec/fs_spec.lua | 2 | ||||
-rw-r--r-- | spec/fun_spec.lua | 2 | ||||
-rw-r--r-- | spec/help_spec.lua | 10 | ||||
-rw-r--r-- | spec/init_spec.lua | 12 | ||||
-rw-r--r-- | spec/lint_spec.lua | 18 | ||||
-rw-r--r-- | spec/list_spec.lua | 10 | ||||
-rw-r--r-- | spec/make_manifest_spec.lua | 8 | ||||
-rw-r--r-- | spec/make_spec.lua | 22 | ||||
-rw-r--r-- | spec/new_version_spec.lua | 2 | ||||
-rw-r--r-- | spec/pack_spec.lua | 2 | ||||
-rw-r--r-- | spec/path_spec.lua | 20 | ||||
-rw-r--r-- | spec/persist_spec.lua | 2 | ||||
-rw-r--r-- | spec/purge_spec.lua | 38 | ||||
-rw-r--r-- | spec/refresh_cache_spec.lua | 8 | ||||
-rw-r--r-- | spec/remove_spec.lua | 24 | ||||
-rw-r--r-- | spec/search_spec.lua | 12 | ||||
-rw-r--r-- | spec/show_spec.lua | 2 | ||||
-rw-r--r-- | spec/unpack_spec.lua | 22 | ||||
-rw-r--r-- | spec/upload_spec.lua | 16 | ||||
-rw-r--r-- | spec/util_spec.lua | 16 | ||||
-rw-r--r-- | spec/which_spec.lua | 2 | ||||
-rw-r--r-- | spec/write_rockspec_spec.lua | 2 |
29 files changed, 156 insertions, 162 deletions
diff --git a/spec/add_spec.lua b/spec/add_spec.lua index 394b8f8a..b0b3a171 100644 --- a/spec/add_spec.lua +++ b/spec/add_spec.lua | |||
@@ -16,28 +16,28 @@ describe("LuaRocks add tests #integration", function() | |||
16 | end) | 16 | end) |
17 | 17 | ||
18 | describe("LuaRocks-admin add tests", function() | 18 | describe("LuaRocks-admin add tests", function() |
19 | it("LuaRocks-admin add invalid rock #ssh", function() | 19 | it("invalid rock #ssh", function() |
20 | assert.is_false(run.luarocks_admin_bool("--server=testing add invalid")) | 20 | assert.is_false(run.luarocks_admin_bool("--server=testing add invalid")) |
21 | end) | 21 | end) |
22 | 22 | ||
23 | it("LuaRocks-admin add missing argument", function() | 23 | it("missing argument", function() |
24 | assert.is_false(run.luarocks_admin_bool("--server=testing add")) | 24 | assert.is_false(run.luarocks_admin_bool("--server=testing add")) |
25 | end) | 25 | end) |
26 | 26 | ||
27 | it("LuaRocks-admin add invalid server", function() | 27 | it("invalid server", function() |
28 | assert.is_false(run.luarocks_admin_bool("--server=invalid add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) | 28 | assert.is_false(run.luarocks_admin_bool("--server=invalid add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) |
29 | end) | 29 | end) |
30 | 30 | ||
31 | it("LuaRocks-admin add invalid server #ssh", function() | 31 | it("invalid server #ssh", function() |
32 | assert.is_true(run.luarocks_admin_bool("--server=testing add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) | 32 | assert.is_true(run.luarocks_admin_bool("--server=testing add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) |
33 | end) | 33 | end) |
34 | 34 | ||
35 | --TODO This test fails, sftp support not yet implemented | 35 | --TODO This test fails, sftp support not yet implemented |
36 | it("LuaRocks-admin add invalid server", function() | 36 | it("invalid server", function() |
37 | assert.is_false(run.luarocks_admin_bool("--server=testing add luasocket-3.0rc1-2.src.rock", { LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/testing_config_sftp.lua" } )) | 37 | assert.is_false(run.luarocks_admin_bool("--server=testing add luasocket-3.0rc1-2.src.rock", { LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/testing_config_sftp.lua" } )) |
38 | end) | 38 | end) |
39 | 39 | ||
40 | it("LuaRocks-admin add, split server url", function() | 40 | it("split server url", function() |
41 | assert.is_false(run.luarocks_admin_bool("--server=\"localhost@/tmp/luarocks_testing\" add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) | 41 | assert.is_false(run.luarocks_admin_bool("--server=\"localhost@/tmp/luarocks_testing\" add " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.src.rock")) |
42 | end) | 42 | end) |
43 | end) | 43 | end) |
diff --git a/spec/deps_spec.lua b/spec/deps_spec.lua index 846434f4..b677acc4 100644 --- a/spec/deps_spec.lua +++ b/spec/deps_spec.lua | |||
@@ -13,13 +13,13 @@ local extra_rocks = { | |||
13 | "/lpeg-1.0.0-1.src.rock", | 13 | "/lpeg-1.0.0-1.src.rock", |
14 | } | 14 | } |
15 | 15 | ||
16 | describe("LuaRocks deps tests #integration", function() | 16 | describe("LuaRocks deps-mode #integration", function() |
17 | 17 | ||
18 | before_each(function() | 18 | before_each(function() |
19 | test_env.setup_specs(extra_rocks) | 19 | test_env.setup_specs(extra_rocks) |
20 | end) | 20 | end) |
21 | 21 | ||
22 | it("LuaRocks deps mode one", function() | 22 | it("one", function() |
23 | assert.is_true(run.luarocks_bool("build --tree=system lpeg")) | 23 | assert.is_true(run.luarocks_bool("build --tree=system lpeg")) |
24 | assert.is_true(run.luarocks_bool("build --deps-mode=one --tree=" .. testing_paths.testing_tree .. " lxsh")) | 24 | assert.is_true(run.luarocks_bool("build --deps-mode=one --tree=" .. testing_paths.testing_tree .. " lxsh")) |
25 | 25 | ||
@@ -29,7 +29,7 @@ describe("LuaRocks deps tests #integration", function() | |||
29 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 29 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
30 | end) | 30 | end) |
31 | 31 | ||
32 | it("LuaRocks deps mode order", function() | 32 | it("order", function() |
33 | assert.is_true(run.luarocks_bool("build --tree=system lpeg")) | 33 | assert.is_true(run.luarocks_bool("build --tree=system lpeg")) |
34 | assert.is_true(run.luarocks_bool("build --deps-mode=order --tree=" .. testing_paths.testing_tree .. " lxsh")) | 34 | assert.is_true(run.luarocks_bool("build --deps-mode=order --tree=" .. testing_paths.testing_tree .. " lxsh")) |
35 | 35 | ||
@@ -39,7 +39,7 @@ describe("LuaRocks deps tests #integration", function() | |||
39 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 39 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
40 | end) | 40 | end) |
41 | 41 | ||
42 | it("LuaRocks deps mode order sys", function() | 42 | it("order sys", function() |
43 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) | 43 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) |
44 | assert.is_true(run.luarocks_bool("build --deps-mode=order --tree=" .. testing_paths.testing_sys_tree .. " lxsh")) | 44 | assert.is_true(run.luarocks_bool("build --deps-mode=order --tree=" .. testing_paths.testing_sys_tree .. " lxsh")) |
45 | 45 | ||
@@ -49,7 +49,7 @@ describe("LuaRocks deps tests #integration", function() | |||
49 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 49 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
50 | end) | 50 | end) |
51 | 51 | ||
52 | it("LuaRocks deps mode all sys", function() | 52 | it("all sys", function() |
53 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) | 53 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) |
54 | assert.is_true(run.luarocks_bool("build --deps-mode=all --tree=" .. testing_paths.testing_sys_tree .. " lxsh")) | 54 | assert.is_true(run.luarocks_bool("build --deps-mode=all --tree=" .. testing_paths.testing_sys_tree .. " lxsh")) |
55 | 55 | ||
@@ -59,7 +59,7 @@ describe("LuaRocks deps tests #integration", function() | |||
59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
60 | end) | 60 | end) |
61 | 61 | ||
62 | it("LuaRocks deps mode none", function() | 62 | it("none", function() |
63 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) | 63 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) |
64 | assert.is_true(run.luarocks_bool("build --deps-mode=none lxsh")) | 64 | assert.is_true(run.luarocks_bool("build --deps-mode=none lxsh")) |
65 | 65 | ||
@@ -78,7 +78,7 @@ describe("LuaRocks deps tests #integration", function() | |||
78 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 78 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
79 | end) | 79 | end) |
80 | 80 | ||
81 | it("LuaRocks deps mode make order", function() | 81 | it("make order", function() |
82 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_sys_tree .. " lpeg")) | 82 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_sys_tree .. " lpeg")) |
83 | assert.is_true(run.luarocks_bool("download --source lxsh 0.8.6")) | 83 | assert.is_true(run.luarocks_bool("download --source lxsh 0.8.6")) |
84 | assert.is_true(run.luarocks_bool("unpack lxsh-0.8.6-2.src.rock")) | 84 | assert.is_true(run.luarocks_bool("unpack lxsh-0.8.6-2.src.rock")) |
@@ -95,7 +95,7 @@ describe("LuaRocks deps tests #integration", function() | |||
95 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 95 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
96 | end) | 96 | end) |
97 | 97 | ||
98 | it("LuaRocks deps mode make order sys", function() | 98 | it("make order sys", function() |
99 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) | 99 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) |
100 | assert.is_true(run.luarocks_bool("download --source lxsh 0.8.6")) | 100 | assert.is_true(run.luarocks_bool("download --source lxsh 0.8.6")) |
101 | assert.is_true(run.luarocks_bool("unpack lxsh-0.8.6-2.src.rock")) | 101 | assert.is_true(run.luarocks_bool("unpack lxsh-0.8.6-2.src.rock")) |
diff --git a/spec/dir_spec.lua b/spec/dir_spec.lua index 249f8aba..c5162b60 100644 --- a/spec/dir_spec.lua +++ b/spec/dir_spec.lua | |||
@@ -5,7 +5,7 @@ test_env.unload_luarocks() | |||
5 | test_env.setup_specs() | 5 | test_env.setup_specs() |
6 | local dir = require("luarocks.dir") | 6 | local dir = require("luarocks.dir") |
7 | 7 | ||
8 | describe("Luarocks dir test #unit", function() | 8 | describe("luarocks.dir #unit", function() |
9 | local runner | 9 | local runner |
10 | 10 | ||
11 | setup(function() | 11 | setup(function() |
diff --git a/spec/doc_spec.lua b/spec/doc_spec.lua index 2c0f4bce..19cfb26a 100644 --- a/spec/doc_spec.lua +++ b/spec/doc_spec.lua | |||
@@ -4,21 +4,21 @@ local testing_paths = test_env.testing_paths | |||
4 | 4 | ||
5 | test_env.unload_luarocks() | 5 | test_env.unload_luarocks() |
6 | 6 | ||
7 | describe("LuaRocks doc tests #integration", function() | 7 | describe("luarocks doc #integration", function() |
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs(extra_rocks) | 9 | test_env.setup_specs(extra_rocks) |
10 | end) | 10 | end) |
11 | 11 | ||
12 | describe("LuaRocks doc basic tests", function() | 12 | describe("basic tests", function() |
13 | it("LuaRocks doc with no flags/arguments", function() | 13 | it("with no flags/arguments", function() |
14 | assert.is_false(run.luarocks_bool("doc")) | 14 | assert.is_false(run.luarocks_bool("doc")) |
15 | end) | 15 | end) |
16 | 16 | ||
17 | it("LuaRocks doc with invalid argument", function() | 17 | it("with invalid argument", function() |
18 | assert.is_false(run.luarocks_bool("doc invalid")) | 18 | assert.is_false(run.luarocks_bool("doc invalid")) |
19 | end) | 19 | end) |
20 | 20 | ||
21 | it("LuaRocks doc with no homepage and no doc folder", function() | 21 | it("with no homepage and no doc folder", function() |
22 | test_env.run_in_tmp(function(tmpdir) | 22 | test_env.run_in_tmp(function(tmpdir) |
23 | test_env.write_file("test-1.0-1.rockspec", [[ | 23 | test_env.write_file("test-1.0-1.rockspec", [[ |
24 | package = "test" | 24 | package = "test" |
@@ -40,7 +40,7 @@ describe("LuaRocks doc tests #integration", function() | |||
40 | end, finally) | 40 | end, finally) |
41 | end) | 41 | end) |
42 | 42 | ||
43 | it("LuaRocks doc with no doc folder but with homepage", function() | 43 | it("with no doc folder but with homepage", function() |
44 | test_env.run_in_tmp(function(tmpdir) | 44 | test_env.run_in_tmp(function(tmpdir) |
45 | test_env.write_file("test-1.0-1.rockspec", [[ | 45 | test_env.write_file("test-1.0-1.rockspec", [[ |
46 | package = "test" | 46 | package = "test" |
@@ -75,8 +75,8 @@ describe("LuaRocks doc tests #integration", function() | |||
75 | end) | 75 | end) |
76 | end) | 76 | end) |
77 | 77 | ||
78 | describe("LuaRocks doc tests with flags", function() | 78 | describe("tests with flags", function() |
79 | it("LuaRocks doc of installed package", function() | 79 | it("of installed package", function() |
80 | test_env.run_in_tmp(function(tmpdir) | 80 | test_env.run_in_tmp(function(tmpdir) |
81 | test_env.write_file("test-1.0-1.rockspec", [[ | 81 | test_env.write_file("test-1.0-1.rockspec", [[ |
82 | package = "test" | 82 | package = "test" |
@@ -101,7 +101,7 @@ describe("LuaRocks doc tests #integration", function() | |||
101 | end, finally) | 101 | end, finally) |
102 | end) | 102 | end) |
103 | 103 | ||
104 | it("LuaRocks doc with --list", function() | 104 | it("with --list", function() |
105 | test_env.run_in_tmp(function(tmpdir) | 105 | test_env.run_in_tmp(function(tmpdir) |
106 | test_env.write_file("test-1.0-1.rockspec", [[ | 106 | test_env.write_file("test-1.0-1.rockspec", [[ |
107 | package = "test" | 107 | package = "test" |
@@ -128,12 +128,12 @@ describe("LuaRocks doc tests #integration", function() | |||
128 | end, finally) | 128 | end, finally) |
129 | end) | 129 | end) |
130 | 130 | ||
131 | it("LuaRocks doc with --local", function() | 131 | it("with --local", function() |
132 | assert.is_true(run.luarocks_bool("install --server=" .. testing_paths.fixtures_dir .. "/a_repo a_rock")) | 132 | assert.is_true(run.luarocks_bool("install --server=" .. testing_paths.fixtures_dir .. "/a_repo a_rock")) |
133 | assert.is_true(run.luarocks_bool("doc --server=" .. testing_paths.fixtures_dir .. "/a_repo a_rock --local")) | 133 | assert.is_true(run.luarocks_bool("doc --server=" .. testing_paths.fixtures_dir .. "/a_repo a_rock --local")) |
134 | end) | 134 | end) |
135 | 135 | ||
136 | it("LuaRocks doc with --porcelain", function() | 136 | it("with --porcelain", function() |
137 | test_env.run_in_tmp(function(tmpdir) | 137 | test_env.run_in_tmp(function(tmpdir) |
138 | test_env.write_file("test-1.0-1.rockspec", [[ | 138 | test_env.write_file("test-1.0-1.rockspec", [[ |
139 | package = "test" | 139 | package = "test" |
diff --git a/spec/download_spec.lua b/spec/download_spec.lua index 39f5b056..42f72008 100644 --- a/spec/download_spec.lua +++ b/spec/download_spec.lua | |||
@@ -9,27 +9,27 @@ local extra_rocks = { | |||
9 | "/validate-args-1.5.4-1.rockspec" | 9 | "/validate-args-1.5.4-1.rockspec" |
10 | } | 10 | } |
11 | 11 | ||
12 | describe("LuaRocks download tests #integration", function() | 12 | describe("luarocks download #integration", function() |
13 | 13 | ||
14 | before_each(function() | 14 | before_each(function() |
15 | test_env.setup_specs(extra_rocks) | 15 | test_env.setup_specs(extra_rocks) |
16 | end) | 16 | end) |
17 | 17 | ||
18 | it("LuaRocks download with no flags/arguments", function() | 18 | it("with no flags/arguments", function() |
19 | assert.is_false(run.luarocks_bool("download")) | 19 | assert.is_false(run.luarocks_bool("download")) |
20 | end) | 20 | end) |
21 | 21 | ||
22 | it("LuaRocks download invalid", function() | 22 | it("invalid", function() |
23 | assert.is_false(run.luarocks_bool("download invalid")) | 23 | assert.is_false(run.luarocks_bool("download invalid")) |
24 | end) | 24 | end) |
25 | 25 | ||
26 | it("LuaRocks download all with delete downloaded files", function() --TODO maybe download --all more rocks | 26 | it("all with delete downloaded files", function() --TODO maybe download --all more rocks |
27 | assert.is_true(run.luarocks_bool("download --all validate-args")) | 27 | assert.is_true(run.luarocks_bool("download --all validate-args")) |
28 | assert.is.truthy(lfs.attributes("validate-args-1.5.4-1.rockspec")) | 28 | assert.is.truthy(lfs.attributes("validate-args-1.5.4-1.rockspec")) |
29 | test_env.remove_files(lfs.currentdir(), "validate--args--") | 29 | test_env.remove_files(lfs.currentdir(), "validate--args--") |
30 | end) | 30 | end) |
31 | 31 | ||
32 | it("LuaRocks download rockspec version", function() | 32 | it("rockspec version", function() |
33 | assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1")) | 33 | assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1")) |
34 | assert.is.truthy(lfs.attributes("validate-args-1.5.4-1.rockspec")) | 34 | assert.is.truthy(lfs.attributes("validate-args-1.5.4-1.rockspec")) |
35 | test_env.remove_files(lfs.currentdir(), "validate--args--") | 35 | test_env.remove_files(lfs.currentdir(), "validate--args--") |
diff --git a/spec/external_spec.lua b/spec/external_spec.lua index 4f1b8dce..63363b76 100644 --- a/spec/external_spec.lua +++ b/spec/external_spec.lua | |||
@@ -4,7 +4,7 @@ local testing_paths = test_env.testing_paths | |||
4 | 4 | ||
5 | test_env.setup_specs() | 5 | test_env.setup_specs() |
6 | 6 | ||
7 | describe("LuaRocks external commands #integration", function() | 7 | describe("luarocks external commands #integration", function() |
8 | setup(function() | 8 | setup(function() |
9 | test_env.mock_server_init() | 9 | test_env.mock_server_init() |
10 | end) | 10 | end) |
diff --git a/spec/fetch_spec.lua b/spec/fetch_spec.lua index cca4fbc7..6e23a8f2 100644 --- a/spec/fetch_spec.lua +++ b/spec/fetch_spec.lua | |||
@@ -13,7 +13,7 @@ local get_tmp_path = test_env.get_tmp_path | |||
13 | local testing_paths = test_env.testing_paths | 13 | local testing_paths = test_env.testing_paths |
14 | local write_file = test_env.write_file | 14 | local write_file = test_env.write_file |
15 | 15 | ||
16 | describe("Luarocks fetch test #unit #mock", function() | 16 | describe("luarocks fetch #unit #mock", function() |
17 | local are_same_files = function(file1, file2) | 17 | local are_same_files = function(file1, file2) |
18 | return file1 == file2 or lfs.attributes(file1).ino == lfs.attributes(file2).ino | 18 | return file1 == file2 or lfs.attributes(file1).ino == lfs.attributes(file2).ino |
19 | end | 19 | end |
diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua index 16295869..cc36d277 100644 --- a/spec/fs_spec.lua +++ b/spec/fs_spec.lua | |||
@@ -19,7 +19,7 @@ local function chdir(d) | |||
19 | fs.change_dir(d) | 19 | fs.change_dir(d) |
20 | end | 20 | end |
21 | 21 | ||
22 | describe("Luarocks fs test #unit", function() | 22 | describe("luarocks.fs #unit", function() |
23 | local exists_file = function(path) | 23 | local exists_file = function(path) |
24 | local ok, err, code = os.rename(path, path) | 24 | local ok, err, code = os.rename(path, path) |
25 | if not ok and code == 13 then | 25 | if not ok and code == 13 then |
diff --git a/spec/fun_spec.lua b/spec/fun_spec.lua index 064440e0..b3589c12 100644 --- a/spec/fun_spec.lua +++ b/spec/fun_spec.lua | |||
@@ -4,7 +4,7 @@ local testing_paths = test_env.testing_paths | |||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | local fun = require("luarocks.fun") | 5 | local fun = require("luarocks.fun") |
6 | 6 | ||
7 | describe("LuaRocks fun tests #unit", function() | 7 | describe("luarocks.fun #unit", function() |
8 | local runner | 8 | local runner |
9 | 9 | ||
10 | setup(function() | 10 | setup(function() |
diff --git a/spec/help_spec.lua b/spec/help_spec.lua index 93b89ce7..70dc5a7e 100644 --- a/spec/help_spec.lua +++ b/spec/help_spec.lua | |||
@@ -3,25 +3,25 @@ local run = test_env.run | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks help tests #integration", function() | 6 | describe("luarocks help #integration", function() |
7 | 7 | ||
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |
10 | end) | 10 | end) |
11 | 11 | ||
12 | it("LuaRocks help with no flags/arguments", function() | 12 | it("with no flags/arguments", function() |
13 | assert.is_true(run.luarocks_bool("help")) | 13 | assert.is_true(run.luarocks_bool("help")) |
14 | end) | 14 | end) |
15 | 15 | ||
16 | it("LuaRocks help invalid argument", function() | 16 | it("invalid argument", function() |
17 | assert.is_false(run.luarocks_bool("help invalid")) | 17 | assert.is_false(run.luarocks_bool("help invalid")) |
18 | end) | 18 | end) |
19 | 19 | ||
20 | it("LuaRocks help config", function() | 20 | it("config", function() |
21 | assert.is_true(run.luarocks_bool("help config")) | 21 | assert.is_true(run.luarocks_bool("help config")) |
22 | end) | 22 | end) |
23 | 23 | ||
24 | it("LuaRocks-admin help with no flags/arguments", function() | 24 | it("luarocks-admin help with no flags/arguments", function() |
25 | assert.is_true(run.luarocks_admin_bool(test_env.quiet("help"))) | 25 | assert.is_true(run.luarocks_admin_bool(test_env.quiet("help"))) |
26 | end) | 26 | end) |
27 | end) | 27 | end) |
diff --git a/spec/init_spec.lua b/spec/init_spec.lua index d8a8e899..4a9c9ab7 100644 --- a/spec/init_spec.lua +++ b/spec/init_spec.lua | |||
@@ -8,13 +8,13 @@ local lfs = require("lfs") | |||
8 | 8 | ||
9 | test_env.unload_luarocks() | 9 | test_env.unload_luarocks() |
10 | 10 | ||
11 | describe("Luarocks init test #integration", function() | 11 | describe("luarocks init #integration", function() |
12 | 12 | ||
13 | setup(function() | 13 | setup(function() |
14 | test_env.setup_specs() | 14 | test_env.setup_specs() |
15 | end) | 15 | end) |
16 | 16 | ||
17 | it("LuaRocks init with no arguments", function() | 17 | it("with no arguments", function() |
18 | test_env.run_in_tmp(function(tmpdir) | 18 | test_env.run_in_tmp(function(tmpdir) |
19 | local myproject = tmpdir .. "/myproject" | 19 | local myproject = tmpdir .. "/myproject" |
20 | lfs.mkdir(myproject) | 20 | lfs.mkdir(myproject) |
@@ -75,7 +75,7 @@ describe("Luarocks init test #integration", function() | |||
75 | end, finally) | 75 | end, finally) |
76 | end) | 76 | end) |
77 | 77 | ||
78 | it("LuaRocks init with given arguments", function() | 78 | it("with given arguments", function() |
79 | test_env.run_in_tmp(function(tmpdir) | 79 | test_env.run_in_tmp(function(tmpdir) |
80 | local myproject = tmpdir .. "/myproject" | 80 | local myproject = tmpdir .. "/myproject" |
81 | lfs.mkdir(myproject) | 81 | lfs.mkdir(myproject) |
@@ -86,7 +86,7 @@ describe("Luarocks init test #integration", function() | |||
86 | end, finally) | 86 | end, finally) |
87 | end) | 87 | end) |
88 | 88 | ||
89 | it("LuaRocks init with --lua-versions", function() | 89 | it("with --lua-versions", function() |
90 | test_env.run_in_tmp(function(tmpdir) | 90 | test_env.run_in_tmp(function(tmpdir) |
91 | local myproject = tmpdir .. "/myproject" | 91 | local myproject = tmpdir .. "/myproject" |
92 | lfs.mkdir(myproject) | 92 | lfs.mkdir(myproject) |
@@ -102,7 +102,7 @@ describe("Luarocks init test #integration", function() | |||
102 | end, finally) | 102 | end, finally) |
103 | end) | 103 | end) |
104 | 104 | ||
105 | it("LuaRocks init in a git repo", function() | 105 | it("in a git repo", function() |
106 | test_env.run_in_tmp(function(tmpdir) | 106 | test_env.run_in_tmp(function(tmpdir) |
107 | local myproject = tmpdir .. "/myproject" | 107 | local myproject = tmpdir .. "/myproject" |
108 | copy_dir(testing_paths.fixtures_dir .. "/git_repo", myproject) | 108 | copy_dir(testing_paths.fixtures_dir .. "/git_repo", myproject) |
@@ -123,7 +123,7 @@ describe("Luarocks init test #integration", function() | |||
123 | end, finally) | 123 | end, finally) |
124 | end) | 124 | end) |
125 | 125 | ||
126 | it("LuaRocks init does not autodetect config or dependencies as modules of the package", function() | 126 | it("does not autodetect config or dependencies as modules of the package", function() |
127 | test_env.run_in_tmp(function(tmpdir) | 127 | test_env.run_in_tmp(function(tmpdir) |
128 | local myproject = tmpdir .. "/myproject" | 128 | local myproject = tmpdir .. "/myproject" |
129 | lfs.mkdir(myproject) | 129 | lfs.mkdir(myproject) |
diff --git a/spec/lint_spec.lua b/spec/lint_spec.lua index 4bc93e95..75774061 100644 --- a/spec/lint_spec.lua +++ b/spec/lint_spec.lua | |||
@@ -11,28 +11,28 @@ local extra_rocks = { | |||
11 | "/validate-args-1.5.4-1.rockspec" | 11 | "/validate-args-1.5.4-1.rockspec" |
12 | } | 12 | } |
13 | 13 | ||
14 | describe("LuaRocks lint tests #integration", function() | 14 | describe("luarocks lint #integration", function() |
15 | 15 | ||
16 | before_each(function() | 16 | before_each(function() |
17 | test_env.setup_specs(extra_rocks) | 17 | test_env.setup_specs(extra_rocks) |
18 | end) | 18 | end) |
19 | 19 | ||
20 | it("LuaRocks lint with no flags/arguments", function() | 20 | it("with no flags/arguments", function() |
21 | assert.is_false(run.luarocks_bool("lint")) | 21 | assert.is_false(run.luarocks_bool("lint")) |
22 | end) | 22 | end) |
23 | 23 | ||
24 | it("LuaRocks lint invalid argument", function() | 24 | it("invalid argument", function() |
25 | assert.is_false(run.luarocks_bool("lint invalid")) | 25 | assert.is_false(run.luarocks_bool("lint invalid")) |
26 | end) | 26 | end) |
27 | 27 | ||
28 | it("LuaRocks lint OK", function() | 28 | it("OK", function() |
29 | assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1")) | 29 | assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1")) |
30 | local output = run.luarocks("lint validate-args-1.5.4-1.rockspec") | 30 | local output = run.luarocks("lint validate-args-1.5.4-1.rockspec") |
31 | assert.are.same(output, "") | 31 | assert.are.same(output, "") |
32 | assert.is_true(os.remove("validate-args-1.5.4-1.rockspec")) | 32 | assert.is_true(os.remove("validate-args-1.5.4-1.rockspec")) |
33 | end) | 33 | end) |
34 | 34 | ||
35 | describe("LuaRocks lint mismatch set", function() | 35 | describe("mismatch set", function() |
36 | local tmpdir | 36 | local tmpdir |
37 | local olddir | 37 | local olddir |
38 | 38 | ||
@@ -52,7 +52,7 @@ describe("LuaRocks lint tests #integration", function() | |||
52 | end | 52 | end |
53 | end) | 53 | end) |
54 | 54 | ||
55 | it("LuaRocks lint mismatch string", function() | 55 | it("mismatch string", function() |
56 | write_file("type_mismatch_string-1.0-1.rockspec", [[ | 56 | write_file("type_mismatch_string-1.0-1.rockspec", [[ |
57 | package="type_mismatch_version" | 57 | package="type_mismatch_version" |
58 | version=1.0 | 58 | version=1.0 |
@@ -60,7 +60,7 @@ describe("LuaRocks lint tests #integration", function() | |||
60 | assert.is_false(run.luarocks_bool("lint type_mismatch_string-1.0-1.rockspec")) | 60 | assert.is_false(run.luarocks_bool("lint type_mismatch_string-1.0-1.rockspec")) |
61 | end) | 61 | end) |
62 | 62 | ||
63 | it("LuaRocks lint mismatch version", function() | 63 | it("mismatch version", function() |
64 | write_file("type_mismatch_version-1.0-1.rockspec", [[ | 64 | write_file("type_mismatch_version-1.0-1.rockspec", [[ |
65 | package="type_mismatch_version" | 65 | package="type_mismatch_version" |
66 | version="1.0" | 66 | version="1.0" |
@@ -68,7 +68,7 @@ describe("LuaRocks lint tests #integration", function() | |||
68 | assert.is_false(run.luarocks_bool("lint type_mismatch_version-1.0-1.rockspec")) | 68 | assert.is_false(run.luarocks_bool("lint type_mismatch_version-1.0-1.rockspec")) |
69 | end) | 69 | end) |
70 | 70 | ||
71 | it("LuaRocks lint mismatch table", function() | 71 | it("mismatch table", function() |
72 | write_file("type_mismatch_table-1.0-1.rockspec", [[ | 72 | write_file("type_mismatch_table-1.0-1.rockspec", [[ |
73 | package="type_mismatch_table" | 73 | package="type_mismatch_table" |
74 | version="1.0-1" | 74 | version="1.0-1" |
@@ -78,7 +78,7 @@ describe("LuaRocks lint tests #integration", function() | |||
78 | assert.is_false(run.luarocks_bool("lint type_mismatch_table-1.0-1.rockspec")) | 78 | assert.is_false(run.luarocks_bool("lint type_mismatch_table-1.0-1.rockspec")) |
79 | end) | 79 | end) |
80 | 80 | ||
81 | it("LuaRocks lint mismatch no build table", function() | 81 | it("mismatch no build table", function() |
82 | write_file("no_build_table-1.0-1.rockspec", [[ | 82 | write_file("no_build_table-1.0-1.rockspec", [[ |
83 | package = "no_build_table" | 83 | package = "no_build_table" |
84 | version = "0.1-1" | 84 | version = "0.1-1" |
diff --git a/spec/list_spec.lua b/spec/list_spec.lua index 8e05c064..20af7164 100644 --- a/spec/list_spec.lua +++ b/spec/list_spec.lua | |||
@@ -9,23 +9,23 @@ local extra_rocks = { | |||
9 | "/say-1.2-1.src.rock" | 9 | "/say-1.2-1.src.rock" |
10 | } | 10 | } |
11 | 11 | ||
12 | describe("LuaRocks list tests #integration", function() | 12 | describe("luarocks list #integration", function() |
13 | 13 | ||
14 | before_each(function() | 14 | before_each(function() |
15 | test_env.setup_specs(extra_rocks) | 15 | test_env.setup_specs(extra_rocks) |
16 | end) | 16 | end) |
17 | 17 | ||
18 | it("LuaRocks list with no flags/arguments", function() | 18 | it("with no flags/arguments", function() |
19 | local output = run.luarocks("list") | 19 | local output = run.luarocks("list") |
20 | assert.match("luacov", output) | 20 | assert.match("luacov", output) |
21 | end) | 21 | end) |
22 | 22 | ||
23 | it("LuaRocks list porcelain", function() | 23 | it("--porcelain", function() |
24 | local output = run.luarocks("list --porcelain") | 24 | local output = run.luarocks("list --porcelain") |
25 | assert.is.truthy(output:find("luacov\t0.13.0-1\tinstalled\t" .. testing_paths.testing_sys_rocks, 1, true)) | 25 | assert.is.truthy(output:find("luacov\t0.13.0-1\tinstalled\t" .. testing_paths.testing_sys_rocks, 1, true)) |
26 | end) | 26 | end) |
27 | 27 | ||
28 | it("LuaRocks list shows version number", function() | 28 | it("shows version number", function() |
29 | local output = run.luarocks("list") | 29 | local output = run.luarocks("list") |
30 | assert.is.truthy(output:find("luacov")) | 30 | assert.is.truthy(output:find("luacov")) |
31 | assert.matches("0.13.0-1", output, 1, true) | 31 | assert.matches("0.13.0-1", output, 1, true) |
@@ -38,7 +38,7 @@ describe("LuaRocks list tests #integration", function() | |||
38 | assert.matches("1.0-1 < ", output, 1, true) | 38 | assert.matches("1.0-1 < ", output, 1, true) |
39 | end) | 39 | end) |
40 | 40 | ||
41 | it("LuaRocks list invalid tree", function() | 41 | it("invalid tree", function() |
42 | local output = run.luarocks("--tree=/some/invalid/tree list") | 42 | local output = run.luarocks("--tree=/some/invalid/tree list") |
43 | assert(output:find("Rocks installed for Lua "..test_env.lua_version.." in /some/invalid/tree", 1, true)) | 43 | assert(output:find("Rocks installed for Lua "..test_env.lua_version.." in /some/invalid/tree", 1, true)) |
44 | end) | 44 | end) |
diff --git a/spec/make_manifest_spec.lua b/spec/make_manifest_spec.lua index a33b1f5b..a3d015c9 100644 --- a/spec/make_manifest_spec.lua +++ b/spec/make_manifest_spec.lua | |||
@@ -3,15 +3,13 @@ local run = test_env.run | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks make_manifest tests #integration", function() | 6 | describe("luarocks make_manifest #integration", function() |
7 | 7 | ||
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |
10 | end) | 10 | end) |
11 | 11 | ||
12 | describe("LuaRocks-admin make manifest tests", function() | 12 | it("runs", function() |
13 | it("LuaRocks-admin make manifest", function() | 13 | assert.is_true(run.luarocks_admin_bool("make_manifest")) |
14 | assert.is_true(run.luarocks_admin_bool("make_manifest")) | ||
15 | end) | ||
16 | end) | 14 | end) |
17 | end) | 15 | end) |
diff --git a/spec/make_spec.lua b/spec/make_spec.lua index 8baa3561..1bfbce7e 100644 --- a/spec/make_spec.lua +++ b/spec/make_spec.lua | |||
@@ -15,13 +15,13 @@ local extra_rocks = { | |||
15 | "/lxsh-0.8.6-2.rockspec" | 15 | "/lxsh-0.8.6-2.rockspec" |
16 | } | 16 | } |
17 | 17 | ||
18 | describe("LuaRocks make tests #integration", function() | 18 | describe("luarocks make #integration", function() |
19 | 19 | ||
20 | before_each(function() | 20 | before_each(function() |
21 | test_env.setup_specs(extra_rocks) | 21 | test_env.setup_specs(extra_rocks) |
22 | end) | 22 | end) |
23 | 23 | ||
24 | it("LuaRocks make with no flags/arguments", function() | 24 | it("with no flags/arguments", function() |
25 | finally(function() | 25 | finally(function() |
26 | lfs.chdir(testing_paths.testrun_dir) | 26 | lfs.chdir(testing_paths.testrun_dir) |
27 | test_env.remove_dir("empty") | 27 | test_env.remove_dir("empty") |
@@ -31,7 +31,7 @@ describe("LuaRocks make tests #integration", function() | |||
31 | assert.is_false(run.luarocks_bool("make")) | 31 | assert.is_false(run.luarocks_bool("make")) |
32 | end) | 32 | end) |
33 | 33 | ||
34 | it("LuaRocks make with rockspec", function() | 34 | it("with rockspec", function() |
35 | finally(function() | 35 | finally(function() |
36 | -- delete downloaded and unpacked files | 36 | -- delete downloaded and unpacked files |
37 | lfs.chdir(testing_paths.testrun_dir) | 37 | lfs.chdir(testing_paths.testrun_dir) |
@@ -50,7 +50,7 @@ describe("LuaRocks make tests #integration", function() | |||
50 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket/3.0rc1-2/luasocket-3.0rc1-2.rockspec")) | 50 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket/3.0rc1-2/luasocket-3.0rc1-2.rockspec")) |
51 | end) | 51 | end) |
52 | 52 | ||
53 | it("LuaRocks make --no-doc", function() | 53 | it("--no-doc", function() |
54 | finally(function() | 54 | finally(function() |
55 | lfs.chdir(testing_paths.testrun_dir) | 55 | lfs.chdir(testing_paths.testrun_dir) |
56 | test_env.remove_dir("luasocket-3.0rc1-2") | 56 | test_env.remove_dir("luasocket-3.0rc1-2") |
@@ -81,7 +81,7 @@ describe("LuaRocks make tests #integration", function() | |||
81 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) | 81 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) |
82 | end) | 82 | end) |
83 | 83 | ||
84 | it("LuaRocks make default rockspec", function() | 84 | it("default rockspec", function() |
85 | assert.is_true(run.luarocks_bool("new_version lxsh-0.8.6-2.rockspec")) | 85 | assert.is_true(run.luarocks_bool("new_version lxsh-0.8.6-2.rockspec")) |
86 | assert.is_true(run.luarocks_bool("make")) | 86 | assert.is_true(run.luarocks_bool("make")) |
87 | 87 | ||
@@ -89,7 +89,7 @@ describe("LuaRocks make tests #integration", function() | |||
89 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-3/lxsh-0.8.6-3.rockspec")) | 89 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-3/lxsh-0.8.6-3.rockspec")) |
90 | end) | 90 | end) |
91 | 91 | ||
92 | it("LuaRocks make unnamed rockspec", function() | 92 | it("unnamed rockspec", function() |
93 | finally(function() | 93 | finally(function() |
94 | os.remove("rockspec") | 94 | os.remove("rockspec") |
95 | end) | 95 | end) |
@@ -101,7 +101,7 @@ describe("LuaRocks make tests #integration", function() | |||
101 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 101 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
102 | end) | 102 | end) |
103 | 103 | ||
104 | it("LuaRocks make ambiguous rockspec", function() | 104 | it("ambiguous rockspec", function() |
105 | assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "lxsh2-0.8.6-2.rockspec")) | 105 | assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "lxsh2-0.8.6-2.rockspec")) |
106 | local output = run.luarocks("make") | 106 | local output = run.luarocks("make") |
107 | assert.is.truthy(output:match("Error: Inconsistency between rockspec filename")) | 107 | assert.is.truthy(output:match("Error: Inconsistency between rockspec filename")) |
@@ -110,7 +110,7 @@ describe("LuaRocks make tests #integration", function() | |||
110 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 110 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
111 | end) | 111 | end) |
112 | 112 | ||
113 | it("LuaRocks make ambiguous unnamed rockspec", function() | 113 | it("ambiguous unnamed rockspec", function() |
114 | assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "1_rockspec")) | 114 | assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "1_rockspec")) |
115 | test_env.copy("1_rockspec", "2_rockspec") | 115 | test_env.copy("1_rockspec", "2_rockspec") |
116 | local output = run.luarocks("make") | 116 | local output = run.luarocks("make") |
@@ -120,7 +120,7 @@ describe("LuaRocks make tests #integration", function() | |||
120 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 120 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
121 | end) | 121 | end) |
122 | 122 | ||
123 | it("LuaRocks make pack binary rock", function() | 123 | it("pack binary rock", function() |
124 | assert.is_true(run.luarocks_bool("make --deps-mode=none --pack-binary-rock")) | 124 | assert.is_true(run.luarocks_bool("make --deps-mode=none --pack-binary-rock")) |
125 | assert.is.truthy(lfs.attributes("lxsh-0.8.6-2.all.rock")) | 125 | assert.is.truthy(lfs.attributes("lxsh-0.8.6-2.all.rock")) |
126 | end) | 126 | end) |
@@ -244,7 +244,7 @@ describe("LuaRocks make tests #integration", function() | |||
244 | end) | 244 | end) |
245 | end) | 245 | end) |
246 | 246 | ||
247 | describe("#ddt LuaRocks make upgrading rockspecs with double deploy types", function() | 247 | describe("#ddt upgrading rockspecs with double deploy types", function() |
248 | local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION | 248 | local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION |
249 | local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION | 249 | local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION |
250 | local so = test_env.lib_extension | 250 | local so = test_env.lib_extension |
@@ -347,7 +347,7 @@ describe("LuaRocks make tests #integration", function() | |||
347 | end) | 347 | end) |
348 | end) | 348 | end) |
349 | 349 | ||
350 | describe("LuaRocks make upgrading rockspecs with mixed deploy types", function() | 350 | describe("upgrading rockspecs with mixed deploy types", function() |
351 | before_each(function() | 351 | before_each(function() |
352 | test_env.copy_dir(testing_paths.fixtures_dir .. "/mixed_deploy_type", "mdt") | 352 | test_env.copy_dir(testing_paths.fixtures_dir .. "/mixed_deploy_type", "mdt") |
353 | end) | 353 | end) |
diff --git a/spec/new_version_spec.lua b/spec/new_version_spec.lua index e8952f75..2f628242 100644 --- a/spec/new_version_spec.lua +++ b/spec/new_version_spec.lua | |||
@@ -10,7 +10,7 @@ local extra_rocks = { | |||
10 | "/lpeg-0.12-1.rockspec" | 10 | "/lpeg-0.12-1.rockspec" |
11 | } | 11 | } |
12 | 12 | ||
13 | describe("LuaRocks new_version tests #integration", function() | 13 | describe("luarocks new_version #integration", function() |
14 | 14 | ||
15 | setup(function() | 15 | setup(function() |
16 | test_env.setup_specs(extra_rocks) | 16 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/pack_spec.lua b/spec/pack_spec.lua index f0c128a3..a0b302a3 100644 --- a/spec/pack_spec.lua +++ b/spec/pack_spec.lua | |||
@@ -13,7 +13,7 @@ local extra_rocks = { | |||
13 | "/say-1.0-1.src.rock" | 13 | "/say-1.0-1.src.rock" |
14 | } | 14 | } |
15 | 15 | ||
16 | describe("LuaRocks pack #integration", function() | 16 | describe("luarocks pack #integration", function() |
17 | 17 | ||
18 | before_each(function() | 18 | before_each(function() |
19 | test_env.setup_specs(extra_rocks) | 19 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/path_spec.lua b/spec/path_spec.lua index 3a7dcea2..7736741c 100644 --- a/spec/path_spec.lua +++ b/spec/path_spec.lua | |||
@@ -3,12 +3,12 @@ local run = test_env.run | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks path tests #integration", function() | 6 | describe("luarocks path #integration", function() |
7 | before_each(function() | 7 | before_each(function() |
8 | test_env.setup_specs() | 8 | test_env.setup_specs() |
9 | end) | 9 | end) |
10 | 10 | ||
11 | it("LuaRocks path", function() | 11 | it("runs", function() |
12 | local output = run.luarocks("path") | 12 | local output = run.luarocks("path") |
13 | assert.match("LUA_PATH=", output) | 13 | assert.match("LUA_PATH=", output) |
14 | assert.match("LUA_CPATH=", output) | 14 | assert.match("LUA_CPATH=", output) |
@@ -17,21 +17,21 @@ describe("LuaRocks path tests #integration", function() | |||
17 | if _VERSION:match("[23]") then | 17 | if _VERSION:match("[23]") then |
18 | local v = _VERSION:gsub("Lua (%d+)%.(%d+)", "%1_%2") | 18 | local v = _VERSION:gsub("Lua (%d+)%.(%d+)", "%1_%2") |
19 | 19 | ||
20 | it("LuaRocks path with LUA_PATH_"..v, function() | 20 | it("with LUA_PATH_"..v, function() |
21 | local output = run.luarocks("path", { | 21 | local output = run.luarocks("path", { |
22 | ["LUA_PATH_"..v] = package.path, | 22 | ["LUA_PATH_"..v] = package.path, |
23 | }) | 23 | }) |
24 | assert.match("LUA_PATH_"..v.."=", output) | 24 | assert.match("LUA_PATH_"..v.."=", output) |
25 | end) | 25 | end) |
26 | 26 | ||
27 | it("LuaRocks path with LUA_CPATH_"..v, function() | 27 | it("with LUA_CPATH_"..v, function() |
28 | local output = run.luarocks("path", { | 28 | local output = run.luarocks("path", { |
29 | ["LUA_CPATH_"..v] = package.cpath, | 29 | ["LUA_CPATH_"..v] = package.cpath, |
30 | }) | 30 | }) |
31 | assert.match("LUA_CPATH_"..v.."=", output) | 31 | assert.match("LUA_CPATH_"..v.."=", output) |
32 | end) | 32 | end) |
33 | 33 | ||
34 | it("LuaRocks path with LUA_PATH_"..v.." and LUA_CPATH_"..v, function() | 34 | it("with LUA_PATH_"..v.." and LUA_CPATH_"..v, function() |
35 | local output = run.luarocks("path", { | 35 | local output = run.luarocks("path", { |
36 | ["LUA_PATH_"..v] = package.path, | 36 | ["LUA_PATH_"..v] = package.path, |
37 | ["LUA_CPATH_"..v] = package.cpath, | 37 | ["LUA_CPATH_"..v] = package.cpath, |
@@ -42,23 +42,23 @@ describe("LuaRocks path tests #integration", function() | |||
42 | 42 | ||
43 | end | 43 | end |
44 | 44 | ||
45 | it("LuaRocks path bin", function() | 45 | it("--bin", function() |
46 | assert.is_true(run.luarocks_bool("path --bin")) | 46 | assert.is_true(run.luarocks_bool("path --bin")) |
47 | end) | 47 | end) |
48 | 48 | ||
49 | it("LuaRocks path lr-path", function() | 49 | it("--lr-path", function() |
50 | assert.is_true(run.luarocks_bool("path --lr-path")) | 50 | assert.is_true(run.luarocks_bool("path --lr-path")) |
51 | end) | 51 | end) |
52 | 52 | ||
53 | it("LuaRocks path lr-cpath", function() | 53 | it("--lr-cpath", function() |
54 | assert.is_true(run.luarocks_bool("path --lr-cpath")) | 54 | assert.is_true(run.luarocks_bool("path --lr-cpath")) |
55 | end) | 55 | end) |
56 | 56 | ||
57 | it("LuaRocks path with tree", function() | 57 | it("--tree", function() |
58 | assert.is_true(run.luarocks_bool("path --tree=lua_modules")) | 58 | assert.is_true(run.luarocks_bool("path --tree=lua_modules")) |
59 | end) | 59 | end) |
60 | 60 | ||
61 | it("LuaRocks path with project-tree", function() | 61 | it("--project-tree", function() |
62 | local path1 = "/share/lua/5%." .. test_env.lua_version:sub(3, 3) .. "/%?%.lua" | 62 | local path1 = "/share/lua/5%." .. test_env.lua_version:sub(3, 3) .. "/%?%.lua" |
63 | local path2 = "/share/lua/5%." .. test_env.lua_version:sub(3, 3) .. "/%?/init%.lua" | 63 | local path2 = "/share/lua/5%." .. test_env.lua_version:sub(3, 3) .. "/%?/init%.lua" |
64 | 64 | ||
diff --git a/spec/persist_spec.lua b/spec/persist_spec.lua index 734b2a4e..722331b8 100644 --- a/spec/persist_spec.lua +++ b/spec/persist_spec.lua | |||
@@ -4,7 +4,7 @@ local testing_paths = test_env.testing_paths | |||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | local persist = require("luarocks.persist") | 5 | local persist = require("luarocks.persist") |
6 | 6 | ||
7 | describe("Luarocks persist test #unit", function() | 7 | describe("luarocks.persist #unit", function() |
8 | local runner | 8 | local runner |
9 | 9 | ||
10 | setup(function() | 10 | setup(function() |
diff --git a/spec/purge_spec.lua b/spec/purge_spec.lua index 18445b60..ccd26bdf 100644 --- a/spec/purge_spec.lua +++ b/spec/purge_spec.lua | |||
@@ -8,29 +8,27 @@ local extra_rocks = { | |||
8 | "/say-1.0-1.src.rock", | 8 | "/say-1.0-1.src.rock", |
9 | } | 9 | } |
10 | 10 | ||
11 | describe("LuaRocks purge tests #integration", function() | 11 | describe("luarocks purge #integration", function() |
12 | before_each(function() | 12 | before_each(function() |
13 | test_env.setup_specs(extra_rocks) | 13 | test_env.setup_specs(extra_rocks) |
14 | end) | 14 | end) |
15 | 15 | ||
16 | describe("LuaRocks purge basic tests", function() | 16 | it("missing tree", function() |
17 | it("LuaRocks purge missing tree", function() | 17 | assert.is_false(run.luarocks_bool("purge --tree=" .. testing_paths.testing_tree)) |
18 | assert.is_false(run.luarocks_bool("purge --tree=" .. testing_paths.testing_tree)) | 18 | end) |
19 | end) | 19 | it("tree with no string", function() |
20 | it("LuaRocks purge tree with no string", function() | 20 | assert.is_false(run.luarocks_bool("purge --tree=")) |
21 | assert.is_false(run.luarocks_bool("purge --tree=")) | 21 | end) |
22 | end) | 22 | it("tree with no string", function() |
23 | it("LuaRocks purge tree with no string", function() | 23 | assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree)) |
24 | assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree)) | 24 | end) |
25 | end) | 25 | it("tree missing files", function() |
26 | it("LuaRocks purge tree missing files", function() | 26 | assert.is_true(run.luarocks_bool("install say 1.0")) |
27 | assert.is_true(run.luarocks_bool("install say 1.0")) | 27 | test_env.remove_dir(testing_paths.testing_sys_tree .. "/share/lua/"..test_env.lua_version.."/say") |
28 | test_env.remove_dir(testing_paths.testing_sys_tree .. "/share/lua/"..test_env.lua_version.."/say") | 28 | assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree)) |
29 | assert.is_true(run.luarocks_bool("purge --tree=" .. testing_paths.testing_sys_tree)) | 29 | assert.is_false(test_env.exists(testing_paths.testing_sys_rocks .. "/say")) |
30 | assert.is_false(test_env.exists(testing_paths.testing_sys_rocks .. "/say")) | 30 | end) |
31 | end) | 31 | it("old versions tree", function() |
32 | it("LuaRocks purge old versions tree", function() | 32 | assert.is_true(run.luarocks_bool("purge --old-versions --tree=" .. testing_paths.testing_sys_tree)) |
33 | assert.is_true(run.luarocks_bool("purge --old-versions --tree=" .. testing_paths.testing_sys_tree)) | ||
34 | end) | ||
35 | end) | 33 | end) |
36 | end) | 34 | end) |
diff --git a/spec/refresh_cache_spec.lua b/spec/refresh_cache_spec.lua index 9bf0361c..c0877371 100644 --- a/spec/refresh_cache_spec.lua +++ b/spec/refresh_cache_spec.lua | |||
@@ -3,15 +3,13 @@ local run = test_env.run | |||
3 | 3 | ||
4 | test_env.unload_luarocks() | 4 | test_env.unload_luarocks() |
5 | 5 | ||
6 | describe("LuaRocks refresh_cache tests #integration", function() | 6 | describe("luarocks-admin refresh_cache #integration", function() |
7 | 7 | ||
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |
10 | end) | 10 | end) |
11 | 11 | ||
12 | describe("LuaRocks-admin refresh cache tests #ssh", function() | 12 | it("runs #ssh", function() |
13 | it("LuaRocks-admin refresh cache", function() | 13 | assert.is_true(run.luarocks_admin_bool("--server=testing refresh_cache")) |
14 | assert.is_true(run.luarocks_admin_bool("--server=testing refresh_cache")) | ||
15 | end) | ||
16 | end) | 14 | end) |
17 | end) | 15 | end) |
diff --git a/spec/remove_spec.lua b/spec/remove_spec.lua index cc9eb599..cdac5c01 100644 --- a/spec/remove_spec.lua +++ b/spec/remove_spec.lua | |||
@@ -12,37 +12,37 @@ local extra_rocks = { | |||
12 | "/coxpcall-1.16.0-1.rockspec" | 12 | "/coxpcall-1.16.0-1.rockspec" |
13 | } | 13 | } |
14 | 14 | ||
15 | describe("LuaRocks remove tests #integration", function() | 15 | describe("luarocks remove #integration", function() |
16 | 16 | ||
17 | before_each(function() | 17 | before_each(function() |
18 | test_env.setup_specs(extra_rocks) | 18 | test_env.setup_specs(extra_rocks) |
19 | end) | 19 | end) |
20 | 20 | ||
21 | describe("LuaRocks remove basic tests", function() | 21 | describe("basic tests", function() |
22 | it("LuaRocks remove with no flags/arguments", function() | 22 | it("with no flags/arguments", function() |
23 | assert.is_false(run.luarocks_bool("remove")) | 23 | assert.is_false(run.luarocks_bool("remove")) |
24 | end) | 24 | end) |
25 | 25 | ||
26 | it("LuaRocks remove invalid rock", function() | 26 | it("invalid rock", function() |
27 | assert.is_false(run.luarocks_bool("remove invalid.rock")) | 27 | assert.is_false(run.luarocks_bool("remove invalid.rock")) |
28 | end) | 28 | end) |
29 | 29 | ||
30 | it("LuaRocks remove missing rock", function() | 30 | it("missing rock", function() |
31 | assert.is_false(run.luarocks_bool("remove missing_rock")) | 31 | assert.is_false(run.luarocks_bool("remove missing_rock")) |
32 | end) | 32 | end) |
33 | 33 | ||
34 | it("LuaRocks remove invalid argument", function() | 34 | it("invalid argument", function() |
35 | assert.is_false(run.luarocks_bool("remove luacov --deps-mode")) | 35 | assert.is_false(run.luarocks_bool("remove luacov --deps-mode")) |
36 | end) | 36 | end) |
37 | 37 | ||
38 | it("LuaRocks remove built abelhas", function() | 38 | it("built abelhas", function() |
39 | assert.is_true(run.luarocks_bool("build abelhas 1.1")) | 39 | assert.is_true(run.luarocks_bool("build abelhas 1.1")) |
40 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) | 40 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) |
41 | assert.is_true(run.luarocks_bool("remove abelhas 1.1")) | 41 | assert.is_true(run.luarocks_bool("remove abelhas 1.1")) |
42 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) | 42 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) |
43 | end) | 43 | end) |
44 | 44 | ||
45 | it("LuaRocks remove built abelhas with uppercase name", function() | 45 | it("built abelhas with uppercase name", function() |
46 | assert.is_true(run.luarocks_bool("build abelhas 1.1")) | 46 | assert.is_true(run.luarocks_bool("build abelhas 1.1")) |
47 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) | 47 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/abelhas")) |
48 | assert.is_true(run.luarocks_bool("remove Abelhas 1.1")) | 48 | assert.is_true(run.luarocks_bool("remove Abelhas 1.1")) |
@@ -50,12 +50,12 @@ describe("LuaRocks remove tests #integration", function() | |||
50 | end) | 50 | end) |
51 | end) | 51 | end) |
52 | 52 | ||
53 | describe("LuaRocks remove more complex tests", function() | 53 | describe("more complex tests", function() |
54 | before_each(function() | 54 | before_each(function() |
55 | assert.is.truthy(test_env.need_rock("coxpcall")) | 55 | assert.is.truthy(test_env.need_rock("coxpcall")) |
56 | end) | 56 | end) |
57 | 57 | ||
58 | it("LuaRocks remove fail, break dependencies", function() | 58 | it("fail, break dependencies", function() |
59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) | 59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
60 | assert.is_true(run.luarocks_bool("build copas")) | 60 | assert.is_true(run.luarocks_bool("build copas")) |
61 | 61 | ||
@@ -63,7 +63,7 @@ describe("LuaRocks remove tests #integration", function() | |||
63 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) | 63 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
64 | end) | 64 | end) |
65 | 65 | ||
66 | it("LuaRocks remove force", function() | 66 | it("force", function() |
67 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) | 67 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
68 | assert.is_true(run.luarocks_bool("build copas")) | 68 | assert.is_true(run.luarocks_bool("build copas")) |
69 | 69 | ||
@@ -72,7 +72,7 @@ describe("LuaRocks remove tests #integration", function() | |||
72 | assert.is.truthy(output:find("Checking stability of dependencies")) | 72 | assert.is.truthy(output:find("Checking stability of dependencies")) |
73 | end) | 73 | end) |
74 | 74 | ||
75 | it("LuaRocks remove force fast", function() | 75 | it("force fast", function() |
76 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) | 76 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/coxpcall")) |
77 | assert.is_true(run.luarocks_bool("build copas")) | 77 | assert.is_true(run.luarocks_bool("build copas")) |
78 | 78 | ||
diff --git a/spec/search_spec.lua b/spec/search_spec.lua index 90efb552..1b5d79fa 100644 --- a/spec/search_spec.lua +++ b/spec/search_spec.lua | |||
@@ -7,29 +7,29 @@ local extra_rocks = { | |||
7 | "/lzlib-0.4.1.53-1.src.rock" | 7 | "/lzlib-0.4.1.53-1.src.rock" |
8 | } | 8 | } |
9 | 9 | ||
10 | describe("LuaRocks search tests #integration", function() | 10 | describe("luarocks search #integration", function() |
11 | 11 | ||
12 | before_each(function() | 12 | before_each(function() |
13 | test_env.setup_specs(extra_rocks) | 13 | test_env.setup_specs(extra_rocks) |
14 | end) | 14 | end) |
15 | 15 | ||
16 | it("LuaRocks search with no flags/arguments", function() | 16 | it("with no flags/arguments", function() |
17 | assert.is_false(run.luarocks_bool("search")) | 17 | assert.is_false(run.luarocks_bool("search")) |
18 | end) | 18 | end) |
19 | 19 | ||
20 | it("LuaRocks search zlib", function() | 20 | it("zlib", function() |
21 | assert.is_true(run.luarocks_bool("search zlib")) | 21 | assert.is_true(run.luarocks_bool("search zlib")) |
22 | end) | 22 | end) |
23 | 23 | ||
24 | it("LuaRocks search zlib 1.1", function() | 24 | it("zlib 1.1", function() |
25 | assert.is_true(run.luarocks_bool("search zlib 1.1")) | 25 | assert.is_true(run.luarocks_bool("search zlib 1.1")) |
26 | end) | 26 | end) |
27 | 27 | ||
28 | it("LuaRocks search missing rock", function() | 28 | it("missing rock", function() |
29 | assert.is_true(run.luarocks_bool("search missing_rock")) | 29 | assert.is_true(run.luarocks_bool("search missing_rock")) |
30 | end) | 30 | end) |
31 | 31 | ||
32 | it("LuaRocks search with flag all", function() | 32 | it("with flag all", function() |
33 | assert.is_true(run.luarocks_bool("search --all")) | 33 | assert.is_true(run.luarocks_bool("search --all")) |
34 | end) | 34 | end) |
35 | end) | 35 | end) |
diff --git a/spec/show_spec.lua b/spec/show_spec.lua index c2840d29..e4937157 100644 --- a/spec/show_spec.lua +++ b/spec/show_spec.lua | |||
@@ -4,7 +4,7 @@ local testing_paths = test_env.testing_paths | |||
4 | 4 | ||
5 | test_env.unload_luarocks() | 5 | test_env.unload_luarocks() |
6 | 6 | ||
7 | describe("LuaRocks show #integration", function() | 7 | describe("luarocks show #integration", function() |
8 | 8 | ||
9 | before_each(function() | 9 | before_each(function() |
10 | test_env.setup_specs() | 10 | test_env.setup_specs() |
diff --git a/spec/unpack_spec.lua b/spec/unpack_spec.lua index 1eb40f59..489e01e6 100644 --- a/spec/unpack_spec.lua +++ b/spec/unpack_spec.lua | |||
@@ -10,40 +10,40 @@ local extra_rocks = { | |||
10 | "/luazip-1.2.4-1.rockspec" | 10 | "/luazip-1.2.4-1.rockspec" |
11 | } | 11 | } |
12 | 12 | ||
13 | describe("LuaRocks unpack tests #integration", function() | 13 | describe("luarocks unpack #integration", function() |
14 | 14 | ||
15 | before_each(function() | 15 | before_each(function() |
16 | test_env.setup_specs(extra_rocks) | 16 | test_env.setup_specs(extra_rocks) |
17 | end) | 17 | end) |
18 | 18 | ||
19 | describe("LuaRocks unpack basic fail tests", function() | 19 | describe("basic fail tests", function() |
20 | it("LuaRocks unpack with no flags/arguments", function() | 20 | it("with no flags/arguments", function() |
21 | assert.is_false(run.luarocks_bool("unpack")) | 21 | assert.is_false(run.luarocks_bool("unpack")) |
22 | end) | 22 | end) |
23 | 23 | ||
24 | it("LuaRocks unpack with invalid rockspec", function() | 24 | it("with invalid rockspec", function() |
25 | assert.is_false(run.luarocks_bool("unpack invalid.rockspec")) | 25 | assert.is_false(run.luarocks_bool("unpack invalid.rockspec")) |
26 | end) | 26 | end) |
27 | 27 | ||
28 | it("LuaRocks unpack with invalid patch", function() | 28 | it("with invalid patch", function() |
29 | assert.is_false(run.luarocks_bool("unpack " .. testing_paths.fixtures_dir .. "/invalid_patch-0.1-1.rockspec")) | 29 | assert.is_false(run.luarocks_bool("unpack " .. testing_paths.fixtures_dir .. "/invalid_patch-0.1-1.rockspec")) |
30 | end) | 30 | end) |
31 | end) | 31 | end) |
32 | 32 | ||
33 | describe("LuaRocks unpack more complex tests", function() | 33 | describe("more complex tests", function() |
34 | it("LuaRocks unpack download", function() | 34 | it("download", function() |
35 | assert.is_true(run.luarocks_bool("unpack cprint")) | 35 | assert.is_true(run.luarocks_bool("unpack cprint")) |
36 | test_env.remove_dir("cprint-0.1-2") | 36 | test_env.remove_dir("cprint-0.1-2") |
37 | end) | 37 | end) |
38 | 38 | ||
39 | it("LuaRocks unpack src", function() | 39 | it("src", function() |
40 | assert.is_true(run.luarocks_bool("download --source cprint")) | 40 | assert.is_true(run.luarocks_bool("download --source cprint")) |
41 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.src.rock")) | 41 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.src.rock")) |
42 | os.remove("cprint-0.1-2.src.rock") | 42 | os.remove("cprint-0.1-2.src.rock") |
43 | test_env.remove_dir("cprint-0.1-2") | 43 | test_env.remove_dir("cprint-0.1-2") |
44 | end) | 44 | end) |
45 | 45 | ||
46 | it("LuaRocks unpack src", function() | 46 | it("src", function() |
47 | assert.is_true(run.luarocks_bool("download --rockspec cprint")) | 47 | assert.is_true(run.luarocks_bool("download --rockspec cprint")) |
48 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.rockspec")) | 48 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.rockspec")) |
49 | os.remove("cprint-0.1-2.rockspec") | 49 | os.remove("cprint-0.1-2.rockspec") |
@@ -52,14 +52,14 @@ describe("LuaRocks unpack tests #integration", function() | |||
52 | end) | 52 | end) |
53 | 53 | ||
54 | -- #595 luarocks unpack of a git:// rockspec fails to copy the rockspec | 54 | -- #595 luarocks unpack of a git:// rockspec fails to copy the rockspec |
55 | it("LuaRocks unpack git:// rockspec", function() | 55 | it("git:// rockspec", function() |
56 | assert.is_true(run.luarocks_bool("download --rockspec luazip")) | 56 | assert.is_true(run.luarocks_bool("download --rockspec luazip")) |
57 | assert.is_true(run.luarocks_bool("unpack luazip-1.2.4-1.rockspec")) | 57 | assert.is_true(run.luarocks_bool("unpack luazip-1.2.4-1.rockspec")) |
58 | assert.is_truthy(lfs.attributes("luazip-1.2.4-1/luazip/luazip-1.2.4-1.rockspec")) | 58 | assert.is_truthy(lfs.attributes("luazip-1.2.4-1/luazip/luazip-1.2.4-1.rockspec")) |
59 | test_env.remove_dir("luazip-1.2.4-1") | 59 | test_env.remove_dir("luazip-1.2.4-1") |
60 | end) | 60 | end) |
61 | 61 | ||
62 | it("LuaRocks unpack binary", function() | 62 | it("binary", function() |
63 | assert.is_true(run.luarocks_bool("build cprint")) | 63 | assert.is_true(run.luarocks_bool("build cprint")) |
64 | assert.is_true(run.luarocks_bool("pack cprint")) | 64 | assert.is_true(run.luarocks_bool("pack cprint")) |
65 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2." .. test_env.platform .. ".rock")) | 65 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2." .. test_env.platform .. ".rock")) |
diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua index 3f376d0d..dc073c18 100644 --- a/spec/upload_spec.lua +++ b/spec/upload_spec.lua | |||
@@ -4,39 +4,39 @@ local testing_paths = test_env.testing_paths | |||
4 | 4 | ||
5 | test_env.unload_luarocks() | 5 | test_env.unload_luarocks() |
6 | 6 | ||
7 | describe("LuaRocks upload tests #integration", function() | 7 | describe("luarocks upload #integration", function() |
8 | 8 | ||
9 | before_each(function() | 9 | before_each(function() |
10 | test_env.setup_specs() | 10 | test_env.setup_specs() |
11 | end) | 11 | end) |
12 | 12 | ||
13 | it("LuaRocks upload with no flags/arguments", function() | 13 | it("with no flags/arguments", function() |
14 | assert.is_false(run.luarocks_bool("upload")) | 14 | assert.is_false(run.luarocks_bool("upload")) |
15 | end) | 15 | end) |
16 | 16 | ||
17 | it("LuaRocks upload invalid rockspec", function() | 17 | it("invalid rockspec", function() |
18 | assert.is_false(run.luarocks_bool("upload invalid.rockspec")) | 18 | assert.is_false(run.luarocks_bool("upload invalid.rockspec")) |
19 | end) | 19 | end) |
20 | 20 | ||
21 | it("LuaRocks upload api key invalid", function() | 21 | it("api key invalid", function() |
22 | assert.is_false(run.luarocks_bool("upload --api-key=invalid invalid.rockspec")) | 22 | assert.is_false(run.luarocks_bool("upload --api-key=invalid invalid.rockspec")) |
23 | end) | 23 | end) |
24 | 24 | ||
25 | it("LuaRocks upload api key invalid and skip-pack", function() | 25 | it("api key invalid and skip-pack", function() |
26 | assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --skip-pack " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec")) | 26 | assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --skip-pack " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec")) |
27 | end) | 27 | end) |
28 | 28 | ||
29 | it("LuaRocks upload force #unix", function() | 29 | it("force #unix", function() |
30 | assert.is_true(test_env.need_rock("dkjson")) | 30 | assert.is_true(test_env.need_rock("dkjson")) |
31 | assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --force " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec")) | 31 | assert.is_false(run.luarocks_bool("upload --api-key=\"invalid\" --force " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec")) |
32 | end) | 32 | end) |
33 | 33 | ||
34 | describe("LuaRocks upload tests with Xavante server #mock", function() | 34 | describe("tests with Xavante server #mock", function() |
35 | before_each(test_env.mock_server_init) | 35 | before_each(test_env.mock_server_init) |
36 | 36 | ||
37 | after_each(test_env.mock_server_done) | 37 | after_each(test_env.mock_server_done) |
38 | 38 | ||
39 | it("LuaRocks upload rockspec with api-key", function() | 39 | it("rockspec with api-key", function() |
40 | assert.is_true(run.luarocks_bool("upload " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec " .. test_env.openssl_dirs .. " --api-key=123", {LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/luarocks_site.lua"})) | 40 | assert.is_true(run.luarocks_bool("upload " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec " .. test_env.openssl_dirs .. " --api-key=123", {LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/luarocks_site.lua"})) |
41 | end) | 41 | end) |
42 | 42 | ||
diff --git a/spec/util_spec.lua b/spec/util_spec.lua index b1693cfa..3970a57c 100644 --- a/spec/util_spec.lua +++ b/spec/util_spec.lua | |||
@@ -9,15 +9,15 @@ describe("Basic tests #integration", function() | |||
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |
10 | end) | 10 | end) |
11 | 11 | ||
12 | it("LuaRocks version", function() | 12 | it("--version", function() |
13 | assert.is_true(run.luarocks_bool("--version")) | 13 | assert.is_true(run.luarocks_bool("--version")) |
14 | end) | 14 | end) |
15 | 15 | ||
16 | it("LuaRocks unknown command", function() | 16 | it("unknown command", function() |
17 | assert.is_false(run.luarocks_bool("unknown_command")) | 17 | assert.is_false(run.luarocks_bool("unknown_command")) |
18 | end) | 18 | end) |
19 | 19 | ||
20 | it("LuaRocks arguments fail", function() | 20 | it("arguments fail", function() |
21 | assert.is_false(run.luarocks_bool("--porcelain=invalid")) | 21 | assert.is_false(run.luarocks_bool("--porcelain=invalid")) |
22 | assert.is_false(run.luarocks_bool("--invalid-flag")) | 22 | assert.is_false(run.luarocks_bool("--invalid-flag")) |
23 | assert.is_false(run.luarocks_bool("--server")) | 23 | assert.is_false(run.luarocks_bool("--server")) |
@@ -26,7 +26,7 @@ describe("Basic tests #integration", function() | |||
26 | assert.is_false(run.luarocks_bool("invalid=5")) | 26 | assert.is_false(run.luarocks_bool("invalid=5")) |
27 | end) | 27 | end) |
28 | 28 | ||
29 | it("LuaRocks execute from not existing directory #unix", function() | 29 | it("executing from not existing directory #unix", function() |
30 | local main_path = lfs.currentdir() | 30 | local main_path = lfs.currentdir() |
31 | assert.is_true(lfs.mkdir("idontexist")) | 31 | assert.is_true(lfs.mkdir("idontexist")) |
32 | assert.is_true(lfs.chdir("idontexist")) | 32 | assert.is_true(lfs.chdir("idontexist")) |
@@ -41,15 +41,15 @@ describe("Basic tests #integration", function() | |||
41 | assert.is.truthy(output:find("the Lua package manager")) | 41 | assert.is.truthy(output:find("the Lua package manager")) |
42 | end) | 42 | end) |
43 | 43 | ||
44 | it("LuaRocks timeout", function() | 44 | it("--timeout", function() |
45 | assert.is.truthy(run.luarocks("--timeout=10")) | 45 | assert.is.truthy(run.luarocks("--timeout=10")) |
46 | end) | 46 | end) |
47 | 47 | ||
48 | it("LuaRocks timeout invalid", function() | 48 | it("--timeout invalid", function() |
49 | assert.is_false(run.luarocks_bool("--timeout=abc")) | 49 | assert.is_false(run.luarocks_bool("--timeout=abc")) |
50 | end) | 50 | end) |
51 | 51 | ||
52 | it("LuaRocks only server=testing", function() | 52 | it("--only-server", function() |
53 | assert.is.truthy(run.luarocks("--only-server=testing")) | 53 | assert.is.truthy(run.luarocks("--only-server=testing")) |
54 | end) | 54 | end) |
55 | 55 | ||
@@ -59,7 +59,7 @@ test_env.unload_luarocks() | |||
59 | local util = require("luarocks.util") | 59 | local util = require("luarocks.util") |
60 | local core_util = require("luarocks.core.util") | 60 | local core_util = require("luarocks.core.util") |
61 | 61 | ||
62 | describe("Luarocks util test #unit", function() | 62 | describe("luarocks.util #unit", function() |
63 | local runner | 63 | local runner |
64 | 64 | ||
65 | setup(function() | 65 | setup(function() |
diff --git a/spec/which_spec.lua b/spec/which_spec.lua index 79b9ef7e..4e9bdaf4 100644 --- a/spec/which_spec.lua +++ b/spec/which_spec.lua | |||
@@ -12,7 +12,7 @@ local extra_rocks = { | |||
12 | "/say-1.2-1.src.rock", | 12 | "/say-1.2-1.src.rock", |
13 | } | 13 | } |
14 | 14 | ||
15 | describe("LuaRocks which tests #integration", function() | 15 | describe("luarocks which #integration", function() |
16 | 16 | ||
17 | setup(function() | 17 | setup(function() |
18 | test_env.setup_specs(extra_rocks) | 18 | test_env.setup_specs(extra_rocks) |
diff --git a/spec/write_rockspec_spec.lua b/spec/write_rockspec_spec.lua index 35870775..3031cf10 100644 --- a/spec/write_rockspec_spec.lua +++ b/spec/write_rockspec_spec.lua | |||
@@ -3,7 +3,7 @@ local git_repo = require("spec.util.git_repo") | |||
3 | local lfs = require("lfs") | 3 | local lfs = require("lfs") |
4 | local run = test_env.run | 4 | local run = test_env.run |
5 | 5 | ||
6 | describe("LuaRocks write_rockspec tests #integration", function() | 6 | describe("luarocks write_rockspec tests #integration", function() |
7 | 7 | ||
8 | before_each(function() | 8 | before_each(function() |
9 | test_env.setup_specs() | 9 | test_env.setup_specs() |