aboutsummaryrefslogtreecommitdiff
path: root/spec/new_version_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/new_version_spec.lua')
-rw-r--r--spec/new_version_spec.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/new_version_spec.lua b/spec/new_version_spec.lua
index 2274bce3..4e4d5d27 100644
--- a/spec/new_version_spec.lua
+++ b/spec/new_version_spec.lua
@@ -6,7 +6,8 @@ local testing_paths = test_env.testing_paths
6test_env.unload_luarocks() 6test_env.unload_luarocks()
7 7
8local extra_rocks = { 8local extra_rocks = {
9 "/abelhas-1.0-1.rockspec" 9 "/abelhas-1.0-1.rockspec",
10 "/lpeg-0.12-1.rockspec"
10} 11}
11 12
12describe("LuaRocks new_version tests #blackbox #b_new_version", function() 13describe("LuaRocks new_version tests #blackbox #b_new_version", function()
@@ -25,6 +26,12 @@ describe("LuaRocks new_version tests #blackbox #b_new_version", function()
25 it("LuaRocks new version invalid", function() 26 it("LuaRocks new version invalid", function()
26 assert.is_false(run.luarocks_bool("new_version invalid")) 27 assert.is_false(run.luarocks_bool("new_version invalid"))
27 end) 28 end)
29
30 it("LuaRocks new version invalid url", function()
31 assert.is_true(run.luarocks_bool("download --rockspec abelhas 1.0"))
32 assert.is_true(run.luarocks_bool("new_version abelhas-1.0-1.rockspec 1.1 http://luainvalid"))
33 test_env.remove_files(lfs.currentdir(), "abelhas--")
34 end)
28 end) 35 end)
29 36
30 describe("LuaRocks new_version more complex tests", function() 37 describe("LuaRocks new_version more complex tests", function()
@@ -48,5 +55,11 @@ describe("LuaRocks new_version tests #blackbox #b_new_version", function()
48 assert.is.truthy(lfs.attributes("luacov-0.3-1.rockspec")) 55 assert.is.truthy(lfs.attributes("luacov-0.3-1.rockspec"))
49 test_env.remove_files(lfs.currentdir(), "luacov--") 56 test_env.remove_files(lfs.currentdir(), "luacov--")
50 end) 57 end)
58
59 it("LuaRocks new version updating md5", function()
60 assert.is_true(run.luarocks_bool("download --rockspec lpeg 0.12"))
61 assert.is_true(run.luarocks_bool("new_version lpeg-0.12-1.rockspec 0.2 https://luarocks.org/manifests/gvvaughan/lpeg-1.0.0-1.rockspec"))
62 test_env.remove_files(lfs.currentdir(), "lpeg--")
63 end)
51 end) 64 end)
52end) 65end)