diff options
| author | Peter Melnichenko <mpeterval@gmail.com> | 2016-07-09 16:35:33 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-09 16:35:33 +0400 |
| commit | 8e55688c191827a9b2e9c499a95c888078979e8c (patch) | |
| tree | aeaf8c1886c949e8e357b59a04cebc3be3930bce /spec/unpack_spec.lua | |
| parent | 5af7e0d7c2dcf65e41ae8523f3771e9528be32a7 (diff) | |
| parent | a05ba7ce42ae4e42f80b5cacdd8770ae5e6cc04b (diff) | |
| download | luarocks-8e55688c191827a9b2e9c499a95c888078979e8c.tar.gz luarocks-8e55688c191827a9b2e9c499a95c888078979e8c.tar.bz2 luarocks-8e55688c191827a9b2e9c499a95c888078979e8c.zip | |
Merge pull request #583 from mpeterv/adjust-new-tests
Minor changes and fixes for new test suite
Diffstat (limited to 'spec/unpack_spec.lua')
| -rw-r--r-- | spec/unpack_spec.lua | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/unpack_spec.lua b/spec/unpack_spec.lua index efe902f5..76e9e5a8 100644 --- a/spec/unpack_spec.lua +++ b/spec/unpack_spec.lua | |||
| @@ -1,21 +1,18 @@ | |||
| 1 | local test_env = require("test/test_environment") | 1 | local test_env = require("test/test_environment") |
| 2 | local lfs = require("lfs") | 2 | local run = test_env.run |
| 3 | local testing_paths = test_env.testing_paths | ||
| 3 | 4 | ||
| 4 | test_env.unload_luarocks() | 5 | test_env.unload_luarocks() |
| 5 | local unpack = require("luarocks.unpack") | ||
| 6 | 6 | ||
| 7 | local extra_rocks = { | 7 | local extra_rocks = { |
| 8 | "/cprint-0.1-2.src.rock", | 8 | "/cprint-0.1-2.src.rock", |
| 9 | "/cprint-0.1-2.rockspec" | 9 | "/cprint-0.1-2.rockspec" |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | expose("LuaRocks unpack tests #blackbox #b_unpack", function() | 12 | describe("LuaRocks unpack tests #blackbox #b_unpack", 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 | testing_paths = test_env.testing_paths | ||
| 17 | run = test_env.run | ||
| 18 | platform = test_env.platform | ||
| 19 | end) | 16 | end) |
| 20 | 17 | ||
| 21 | describe("LuaRocks unpack basic fail tests", function() | 18 | describe("LuaRocks unpack basic fail tests", function() |
| @@ -51,9 +48,9 @@ expose("LuaRocks unpack tests #blackbox #b_unpack", function() | |||
| 51 | it("LuaRocks unpack binary", function() | 48 | it("LuaRocks unpack binary", function() |
| 52 | assert.is_true(run.luarocks_bool("build cprint")) | 49 | assert.is_true(run.luarocks_bool("build cprint")) |
| 53 | assert.is_true(run.luarocks_bool("pack cprint")) | 50 | assert.is_true(run.luarocks_bool("pack cprint")) |
| 54 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2." .. platform .. ".rock")) | 51 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2." .. test_env.platform .. ".rock")) |
| 55 | test_env.remove_dir("cprint-0.1-2") | 52 | test_env.remove_dir("cprint-0.1-2") |
| 56 | os.remove("cprint-0.1-2." .. platform .. ".rock") | 53 | os.remove("cprint-0.1-2." .. test_env.platform .. ".rock") |
| 57 | end) | 54 | end) |
| 58 | end) | 55 | end) |
| 59 | end) | 56 | end) |
