diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2020-02-20 15:18:29 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 15:18:29 -0300 |
commit | 568624c42d3ce2e0781e644e881f4b696424829f (patch) | |
tree | d5f18e3f71adfa03829dd8eb85841580a63ddd04 /spec/install_spec.lua | |
parent | dbd8c0dcdc50f4b79ce616221c43de03356e8264 (diff) | |
download | luarocks-568624c42d3ce2e0781e644e881f4b696424829f.tar.gz luarocks-568624c42d3ce2e0781e644e881f4b696424829f.tar.bz2 luarocks-568624c42d3ce2e0781e644e881f4b696424829f.zip |
fs: always check for failure of fs.which_tool (#1157)
Diffstat (limited to 'spec/install_spec.lua')
-rw-r--r-- | spec/install_spec.lua | 12 |
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", [[ |