aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/new_version_spec.lua20
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/new_version_spec.lua b/spec/new_version_spec.lua
index 2274bce3..9207806a 100644
--- a/spec/new_version_spec.lua
+++ b/spec/new_version_spec.lua
@@ -6,7 +6,9 @@ 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 "/md5-1.2-1.rockspec",
11 "/lpeg-0.12-1.rockspec",
10} 12}
11 13
12describe("LuaRocks new_version tests #blackbox #b_new_version", function() 14describe("LuaRocks new_version tests #blackbox #b_new_version", function()
@@ -25,6 +27,12 @@ describe("LuaRocks new_version tests #blackbox #b_new_version", function()
25 it("LuaRocks new version invalid", function() 27 it("LuaRocks new version invalid", function()
26 assert.is_false(run.luarocks_bool("new_version invalid")) 28 assert.is_false(run.luarocks_bool("new_version invalid"))
27 end) 29 end)
30
31 it("LuaRocks new version invalid url", function()
32 assert.is_true(run.luarocks_bool("download --rockspec abelhas 1.0"))
33 assert.is_true(run.luarocks_bool("new_version abelhas-1.0-1.rockspec 1.1 http://luainvalid"))
34 test_env.remove_files(lfs.currentdir(), "abelhas--")
35 end)
28 end) 36 end)
29 37
30 describe("LuaRocks new_version more complex tests", function() 38 describe("LuaRocks new_version more complex tests", function()
@@ -48,5 +56,15 @@ describe("LuaRocks new_version tests #blackbox #b_new_version", function()
48 assert.is.truthy(lfs.attributes("luacov-0.3-1.rockspec")) 56 assert.is.truthy(lfs.attributes("luacov-0.3-1.rockspec"))
49 test_env.remove_files(lfs.currentdir(), "luacov--") 57 test_env.remove_files(lfs.currentdir(), "luacov--")
50 end) 58 end)
59
60 it("LuaRocks new version updating md5", function()
61 assert.is_true(run.luarocks_bool("download --rockspec lpeg 0.12"))
62 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"))
63 test_env.remove_files(lfs.currentdir(), "lpeg--")
64
65 -- assert.is_true(run.luarocks_bool("download --rockspec md5 1.2"))
66 -- assert.is_true(run.luarocks_bool("new_version md5-1.2-1.rockspec 1.3 https://luarocks.org/manifests/tomasguisasola/md5-1.2-1.rockspec"))
67 -- test_env.remove_files(lfs.currentdir(), "md5--")
68 end)
51 end) 69 end)
52end) 70end)