From 5a442c2bd307bd7078eb16c6802323e300d80960 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 13 Aug 2021 15:12:52 -0300 Subject: upload: support uploading pre-packaged .src.rock files (#1321) upload: support uploading pre-packaged .src.rock files Co-authored-by: daurnimator --- spec/upload_spec.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec') diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua index e1215d2c..73775992 100644 --- a/spec/upload_spec.lua +++ b/spec/upload_spec.lua @@ -46,6 +46,14 @@ describe("luarocks upload #integration", function() print(run.luarocks("upload " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec " .. test_env.openssl_dirs .. " --api-key=123 --sign", {LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/luarocks_site.lua"})) end) + it("with .rockspec and .src.rock", function() + assert.is_true(run.luarocks_bool("upload " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.src.rock " .. test_env.openssl_dirs, {LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/luarocks_site.lua"})) + end) + + it("with arguments .src.rock and .rockspec out of order", function() + assert.is_false(run.luarocks_bool("upload " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.src.rock " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec " .. test_env.openssl_dirs, {LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/luarocks_site.lua"})) + end) + it("rockspec with api-key and skip-pack", function() assert.is_true(run.luarocks_bool("upload --skip-pack " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec " .. test_env.openssl_dirs .. " --api-key=123", {LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/luarocks_site.lua"})) end) -- cgit v1.2.3-55-g6feb