From 47a9e7571f5aefd48d5e8d168bd56f07e296b18e Mon Sep 17 00:00:00 2001 From: roboo Date: Mon, 11 Jul 2016 21:29:37 +0200 Subject: Update new_version, pack tests --- spec/new_version_spec.lua | 1 + spec/pack_spec.lua | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'spec') diff --git a/spec/new_version_spec.lua b/spec/new_version_spec.lua index 4e4d5d27..d77d32d1 100644 --- a/spec/new_version_spec.lua +++ b/spec/new_version_spec.lua @@ -30,6 +30,7 @@ describe("LuaRocks new_version tests #blackbox #b_new_version", function() it("LuaRocks new version invalid url", function() assert.is_true(run.luarocks_bool("download --rockspec abelhas 1.0")) assert.is_true(run.luarocks_bool("new_version abelhas-1.0-1.rockspec 1.1 http://luainvalid")) + assert.is.truthy(lfs.attributes("abelhas-1.1-1.rockspec")) test_env.remove_files(lfs.currentdir(), "abelhas--") end) end) diff --git a/spec/pack_spec.lua b/spec/pack_spec.lua index 416184a8..aa827682 100644 --- a/spec/pack_spec.lua +++ b/spec/pack_spec.lua @@ -1,6 +1,7 @@ local test_env = require("test/test_environment") local lfs = require("lfs") local run = test_env.run +local testing_paths = test_env.testing_paths test_env.unload_luarocks() @@ -21,6 +22,10 @@ describe("LuaRocks pack tests #blackbox #b_pack", function() assert.is_true(run.luarocks_bool("pack luacov")) assert.is_true(test_env.remove_files(lfs.currentdir(), "luacov-")) end) + + it("LuaRocks pack invalid rockspec", function() + assert.is_false(run.luarocks_bool("pack " .. testing_paths.testing_dir .. "/testfiles/invaild_validate-args-1.5.4-1.rockspec")) + end) it("LuaRocks pack src", function() assert.is_true(run.luarocks_bool("install luasec")) -- cgit v1.2.3-55-g6feb