aboutsummaryrefslogtreecommitdiff
path: root/spec/new_version_spec.lua
diff options
context:
space:
mode:
authorroboo <robo.karasek@gmail.com>2016-07-10 02:53:00 +0200
committerroboo <robo.karasek@gmail.com>2016-07-10 18:23:28 +0200
commit3641e01a460abc6459924cb9343d774758b8fc2f (patch)
tree52ca3225e48b08d58e166e9dbd192c1513209b4d /spec/new_version_spec.lua
parent8e55688c191827a9b2e9c499a95c888078979e8c (diff)
downloadluarocks-3641e01a460abc6459924cb9343d774758b8fc2f.tar.gz
luarocks-3641e01a460abc6459924cb9343d774758b8fc2f.tar.bz2
luarocks-3641e01a460abc6459924cb9343d774758b8fc2f.zip
Tests added - new_version
Diffstat (limited to 'spec/new_version_spec.lua')
-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)