aboutsummaryrefslogtreecommitdiff
path: root/spec/unpack_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unpack_spec.lua')
-rw-r--r--spec/unpack_spec.lua13
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 @@
1local test_env = require("test/test_environment") 1local test_env = require("test/test_environment")
2local lfs = require("lfs") 2local run = test_env.run
3local testing_paths = test_env.testing_paths
3 4
4test_env.unload_luarocks() 5test_env.unload_luarocks()
5local unpack = require("luarocks.unpack")
6 6
7local extra_rocks = { 7local 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
12expose("LuaRocks unpack tests #blackbox #b_unpack", function() 12describe("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)
59end) 56end)