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.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua
index 5ee913f0..78b4b28d 100644
--- a/spec/install_spec.lua
+++ b/spec/install_spec.lua
@@ -56,6 +56,18 @@ describe("luarocks install #integration", function()
56 assert.is_false(run.luarocks_bool("install --local luasocket ", { USER = "root" } )) 56 assert.is_false(run.luarocks_bool("install --local luasocket ", { USER = "root" } ))
57 end) 57 end)
58 58
59 it("fails with no downloader", function()
60 if test_env.TYPE_TEST_ENV ~= "full" then
61 local output = assert(run.luarocks("install https://example.com/rock-1.0.src.rock", { LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/testing_config_no_downloader.lua" } ))
62 assert.match("no downloader tool", output)
63
64 -- can do http but not https
65 assert(run.luarocks("install luasocket"))
66 output = assert(run.luarocks("install https://example.com/rock-1.0.src.rock", { LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/testing_config_no_downloader.lua" } ))
67 assert.match("no downloader tool", output)
68 end
69 end)
70
59 it("fails not a zip file", function() 71 it("fails not a zip file", function()
60 test_env.run_in_tmp(function(tmpdir) 72 test_env.run_in_tmp(function(tmpdir)
61 write_file("not_a_zipfile-1.0-1.src.rock", [[ 73 write_file("not_a_zipfile-1.0-1.src.rock", [[