aboutsummaryrefslogtreecommitdiff
path: root/spec/install_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install_spec.lua')
-rw-r--r--spec/install_spec.lua18
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua
index 8a5d8f09..0555155b 100644
--- a/spec/install_spec.lua
+++ b/spec/install_spec.lua
@@ -57,18 +57,12 @@ describe("luarocks install #integration", function()
57 end) 57 end)
58 58
59 it("fails not a zip file", function() 59 it("fails not a zip file", function()
60 local olddir = lfs.currentdir() 60 test_env.run_in_tmp(function(tmpdir)
61 local tmpdir = get_tmp_path() 61 write_file("not_a_zipfile-1.0-1.src.rock", [[
62 lfs.mkdir(tmpdir) 62 I am not a .zip file!
63 lfs.chdir(tmpdir) 63 ]], finally)
64 64 assert.is_false(run.luarocks_bool("install not_a_zipfile-1.0-1.src.rock"))
65 write_file("not_a_zipfile-1.0-1.src.rock", [[ 65 end, finally)
66 I am not a .zip file!
67 ]], finally)
68 assert.is_false(run.luarocks_bool("install not_a_zipfile-1.0-1.src.rock"))
69
70 lfs.chdir(olddir)
71 lfs.rmdir(tmpdir)
72 end) 66 end)
73 67
74 it("only-deps of lxsh show there is no lxsh", function() 68 it("only-deps of lxsh show there is no lxsh", function()