diff options
Diffstat (limited to 'spec/deps_spec.lua')
| -rw-r--r-- | spec/deps_spec.lua | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/spec/deps_spec.lua b/spec/deps_spec.lua index c1bd404d..e453c9a1 100644 --- a/spec/deps_spec.lua +++ b/spec/deps_spec.lua | |||
| @@ -8,9 +8,9 @@ test_env.unload_luarocks() | |||
| 8 | local extra_rocks = { | 8 | local extra_rocks = { |
| 9 | "/lxsh-0.8.6-2.src.rock", | 9 | "/lxsh-0.8.6-2.src.rock", |
| 10 | "/lxsh-0.8.6-2.rockspec", | 10 | "/lxsh-0.8.6-2.rockspec", |
| 11 | "/luasocket-3.0rc1-1.src.rock", | 11 | "/luasocket-3.0rc1-2.src.rock", |
| 12 | "/luasocket-3.0rc1-1.rockspec", | 12 | "/luasocket-3.0rc1-2.rockspec", |
| 13 | "/lpeg-0.12-1.src.rock" | 13 | "/lpeg-1.0.0-1.src.rock", |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | describe("LuaRocks deps tests #blackbox #b_deps", function() | 16 | describe("LuaRocks deps tests #blackbox #b_deps", function() |
| @@ -23,59 +23,59 @@ describe("LuaRocks deps tests #blackbox #b_deps", 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 | ||
| 26 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg")) | 26 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 27 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg")) | 27 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 28 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh")) | 28 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 29 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) | 29 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/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("LuaRocks deps mode 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 | ||
| 36 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg")) | 36 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 37 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg")) | 37 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 38 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh")) | 38 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 39 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) | 39 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/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("LuaRocks deps mode 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 | ||
| 46 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg")) | 46 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 47 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg")) | 47 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 48 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh")) | 48 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 49 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) | 49 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/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("LuaRocks deps mode 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 | ||
| 56 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg")) | 56 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 57 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg")) | 57 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 58 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh")) | 58 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) | 59 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/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("LuaRocks deps mode 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 | ||
| 66 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg")) | 66 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 67 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg")) | 67 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 68 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh")) | 68 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 69 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) | 69 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 70 | end) | 70 | end) |
| 71 | 71 | ||
| 72 | it("LuaRocks nodeps alias", function() | 72 | it("LuaRocks nodeps alias", function() |
| 73 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " --nodeps lxsh")) | 73 | assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " --nodeps lxsh")) |
| 74 | 74 | ||
| 75 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg")) | 75 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 76 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg")) | 76 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 77 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh")) | 77 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 78 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) | 78 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/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("LuaRocks deps mode make order", function() |
| @@ -89,10 +89,10 @@ describe("LuaRocks deps tests #blackbox #b_deps", function() | |||
| 89 | test_env.remove_dir("lxsh-0.8.6-2") | 89 | test_env.remove_dir("lxsh-0.8.6-2") |
| 90 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) | 90 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) |
| 91 | 91 | ||
| 92 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg")) | 92 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 93 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg")) | 93 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 94 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh")) | 94 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 95 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) | 95 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/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("LuaRocks deps mode make order sys", function() |
| @@ -106,9 +106,9 @@ describe("LuaRocks deps tests #blackbox #b_deps", function() | |||
| 106 | test_env.remove_dir("lxsh-0.8.6-2") | 106 | test_env.remove_dir("lxsh-0.8.6-2") |
| 107 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) | 107 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) |
| 108 | 108 | ||
| 109 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg")) | 109 | assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 110 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg")) | 110 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
| 111 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh")) | 111 | assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 112 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh")) | 112 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
| 113 | end) | 113 | end) |
| 114 | end) | 114 | end) |
