diff options
| author | Hisham <hisham@gobolinux.org> | 2016-07-11 01:15:41 -0300 |
|---|---|---|
| committer | Hisham <hisham@gobolinux.org> | 2016-07-11 01:15:41 -0300 |
| commit | 994a041b4f1348564f390f3f4d8ec040c8edb4b8 (patch) | |
| tree | 128d264d86576e0b62225056769b7097a745b822 /spec/pack_spec.lua | |
| parent | 41eccd4ca6fe51f8174dd43744e7a4bab4daf2cb (diff) | |
| parent | 77b41dd05a870feeb519e930472133f63cf94317 (diff) | |
| download | luarocks-994a041b4f1348564f390f3f4d8ec040c8edb4b8.tar.gz luarocks-994a041b4f1348564f390f3f4d8ec040c8edb4b8.tar.bz2 luarocks-994a041b4f1348564f390f3f4d8ec040c8edb4b8.zip | |
Merge branch 'master' of https://github.com/keplerproject/luarocks
Diffstat (limited to 'spec/pack_spec.lua')
| -rw-r--r-- | spec/pack_spec.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/pack_spec.lua b/spec/pack_spec.lua new file mode 100644 index 00000000..416184a8 --- /dev/null +++ b/spec/pack_spec.lua | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | local test_env = require("test/test_environment") | ||
| 2 | local lfs = require("lfs") | ||
| 3 | local run = test_env.run | ||
| 4 | |||
| 5 | test_env.unload_luarocks() | ||
| 6 | |||
| 7 | local extra_rocks = { | ||
| 8 | "/luasec-0.6-1.rockspec", | ||
| 9 | "/luasocket-3.0rc1-1.src.rock", | ||
| 10 | "/luasocket-3.0rc1-1.rockspec" | ||
| 11 | } | ||
| 12 | |||
| 13 | describe("LuaRocks pack tests #blackbox #b_pack", function() | ||
| 14 | |||
| 15 | before_each(function() | ||
| 16 | test_env.setup_specs(extra_rocks) | ||
| 17 | end) | ||
| 18 | |||
| 19 | it("LuaRocks pack basic", function() | ||
| 20 | assert.is_true(run.luarocks_bool("list")) | ||
| 21 | assert.is_true(run.luarocks_bool("pack luacov")) | ||
| 22 | assert.is_true(test_env.remove_files(lfs.currentdir(), "luacov-")) | ||
| 23 | end) | ||
| 24 | |||
| 25 | it("LuaRocks pack src", function() | ||
| 26 | assert.is_true(run.luarocks_bool("install luasec")) | ||
| 27 | assert.is_true(run.luarocks_bool("download --rockspec luasocket")) | ||
| 28 | assert.is_true(run.luarocks_bool("pack luasocket-3.0rc1-1.rockspec")) | ||
| 29 | assert.is_true(test_env.remove_files(lfs.currentdir(), "luasocket-")) | ||
| 30 | end) | ||
| 31 | end) | ||
| 32 | |||
| 33 | |||
