diff options
| author | Hisham <hisham@gobolinux.org> | 2016-10-14 16:38:51 -0700 |
|---|---|---|
| committer | Hisham <hisham@gobolinux.org> | 2016-10-14 16:38:51 -0700 |
| commit | 075196e8b5d315888a8ae110fa9a18089044ae3b (patch) | |
| tree | eca3eb78c23f8d85dbe625564a2d66966d6281f1 /spec/pack_spec.lua | |
| parent | dbca97cdcc15e386554b2631a0ae7aca02500abf (diff) | |
| parent | 1fea0e3a0972bcc6b4319cd3d9e79834562486bc (diff) | |
| download | luarocks-075196e8b5d315888a8ae110fa9a18089044ae3b.tar.gz luarocks-075196e8b5d315888a8ae110fa9a18089044ae3b.tar.bz2 luarocks-075196e8b5d315888a8ae110fa9a18089044ae3b.zip | |
Merge branch 'master' into luarocks-3
Diffstat (limited to 'spec/pack_spec.lua')
| -rw-r--r-- | spec/pack_spec.lua | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/pack_spec.lua b/spec/pack_spec.lua index 0e5b31c6..0c6dd8f2 100644 --- a/spec/pack_spec.lua +++ b/spec/pack_spec.lua | |||
| @@ -6,9 +6,10 @@ local testing_paths = test_env.testing_paths | |||
| 6 | test_env.unload_luarocks() | 6 | test_env.unload_luarocks() |
| 7 | 7 | ||
| 8 | local extra_rocks = { | 8 | local extra_rocks = { |
| 9 | "/luasec-0.6-1.rockspec", | 9 | "/luasec-0.6-1.rockspec", |
| 10 | "/luasocket-3.0rc1-1.src.rock", | 10 | "/luassert-1.7.0-1.src.rock", |
| 11 | "/luasocket-3.0rc1-1.rockspec", | 11 | "/luasocket-3.0rc1-2.src.rock", |
| 12 | "/luasocket-3.0rc1-2.rockspec", | ||
| 12 | "/say-1.2-1.src.rock", | 13 | "/say-1.2-1.src.rock", |
| 13 | "/say-1.0-1.src.rock" | 14 | "/say-1.0-1.src.rock" |
| 14 | } | 15 | } |
| @@ -24,7 +25,7 @@ describe("LuaRocks pack tests #blackbox #b_pack", function() | |||
| 24 | end) | 25 | end) |
| 25 | 26 | ||
| 26 | it("LuaRocks pack basic", function() | 27 | it("LuaRocks pack basic", function() |
| 27 | assert.is_true(run.luarocks_bool(test_env.quiet("pack luacov"))) | 28 | assert.is_true(run.luarocks_bool("pack luacov")) |
| 28 | assert.is_true(test_env.remove_files(lfs.currentdir(), "luacov-")) | 29 | assert.is_true(test_env.remove_files(lfs.currentdir(), "luacov-")) |
| 29 | end) | 30 | end) |
| 30 | 31 | ||
| @@ -40,18 +41,19 @@ describe("LuaRocks pack tests #blackbox #b_pack", function() | |||
| 40 | assert.is_false(run.luarocks_bool("pack /non/exist/temp.manif")) | 41 | assert.is_false(run.luarocks_bool("pack /non/exist/temp.manif")) |
| 41 | end) | 42 | end) |
| 42 | 43 | ||
| 43 | it("LuaRocks pack specify which version of rock", function() | 44 | it("LuaRocks pack detects latest version version of rock", function() |
| 44 | assert.is_true(run.luarocks_bool("install say 1.2")) | 45 | assert.is_true(run.luarocks_bool("install say 1.2")) |
| 45 | assert.is_true(run.luarocks_bool("install luassert")) | 46 | assert.is_true(run.luarocks_bool("install luassert")) |
| 46 | assert.is_true(run.luarocks_bool("install say 1.0")) | 47 | assert.is_true(run.luarocks_bool("install say 1.0")) |
| 47 | 48 | assert.is_true(run.luarocks_bool("pack say")) | |
| 48 | assert.is_false(run.luarocks_bool("pack say")) | 49 | assert.is_truthy(lfs.attributes("say-1.2-1.all.rock")) |
| 50 | assert.is_true(test_env.remove_files(lfs.currentdir(), "say-")) | ||
| 49 | end) | 51 | end) |
| 50 | 52 | ||
| 51 | it("LuaRocks pack src", function() | 53 | it("LuaRocks pack src", function() |
| 52 | assert.is_true(run.luarocks_bool(test_env.quiet("install luasec"))) | 54 | assert.is_true(run.luarocks_bool("install luasec " .. test_env.OPENSSL_DIRS)) |
| 53 | assert.is_true(run.luarocks_bool("download --rockspec luasocket 3.0rc1-1")) | 55 | assert.is_true(run.luarocks_bool("download --rockspec luasocket 3.0rc1-2")) |
| 54 | assert.is_true(run.luarocks_bool("pack luasocket-3.0rc1-1.rockspec")) | 56 | assert.is_true(run.luarocks_bool("pack luasocket-3.0rc1-2.rockspec")) |
| 55 | assert.is_true(test_env.remove_files(lfs.currentdir(), "luasocket-")) | 57 | assert.is_true(test_env.remove_files(lfs.currentdir(), "luasocket-")) |
| 56 | end) | 58 | end) |
| 57 | end) | 59 | end) |
