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/unpack_spec.lua | |
| parent | ab0d7b2a266ff7f322af93915472f5d80d4be9af (diff) | |
| download | luarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.tar.gz luarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.tar.bz2 luarocks-bd27d052eaf856bf24c77f556a50b7e19f11cba1.zip | |
tests: shorter descriptions
Diffstat (limited to 'spec/unpack_spec.lua')
| -rw-r--r-- | spec/unpack_spec.lua | 22 |
1 files changed, 11 insertions, 11 deletions
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")) |
