aboutsummaryrefslogtreecommitdiff
path: root/spec/deps_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2017-10-04 11:14:42 -0300
committerGitHub <noreply@github.com>2017-10-04 11:14:42 -0300
commit84b4fe99cac37850a97858e0b641043bd3178d8a (patch)
treeb4578689091b8360aed71f531faf2513b7d41684 /spec/deps_spec.lua
parent100c18d048936b5a47f29f55e6ce8b24277fb70f (diff)
downloadluarocks-84b4fe99cac37850a97858e0b641043bd3178d8a.tar.gz
luarocks-84b4fe99cac37850a97858e0b641043bd3178d8a.tar.bz2
luarocks-84b4fe99cac37850a97858e0b641043bd3178d8a.zip
Use versioned files only. (#734)
Let's take the opportunity of a new major version to make an important cleanup: getting rid of the error-prone unversioned configuration files. This drops support for: * Unversioned config.lua -> use config-5.x.lua * Unversioned luarocks/site_config.lua -> it always generates luarocks/core/site_config_5_x.lua * Unversioned lib/luarocks/rocks -> it always uses lib/luarocks/rocks-5.x
Diffstat (limited to 'spec/deps_spec.lua')
-rw-r--r--spec/deps_spec.lua64
1 files changed, 32 insertions, 32 deletions
diff --git a/spec/deps_spec.lua b/spec/deps_spec.lua
index e453c9a1..8c4effcd 100644
--- a/spec/deps_spec.lua
+++ b/spec/deps_spec.lua
@@ -23,59 +23,59 @@ describe("LuaRocks deps tests #blackbox #b_deps", function()
23 assert.is_true(run.luarocks_bool("build --tree=system lpeg")) 23 assert.is_true(run.luarocks_bool("build --tree=system lpeg"))
24 assert.is_true(run.luarocks_bool("build --deps-mode=one --tree=" .. testing_paths.testing_tree .. " lxsh")) 24 assert.is_true(run.luarocks_bool("build --deps-mode=one --tree=" .. testing_paths.testing_tree .. " lxsh"))
25 25
26 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 26 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
27 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 27 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
28 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 28 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
29 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 29 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
30 end) 30 end)
31 31
32 it("LuaRocks deps mode order", function() 32 it("LuaRocks deps mode order", function()
33 assert.is_true(run.luarocks_bool("build --tree=system lpeg")) 33 assert.is_true(run.luarocks_bool("build --tree=system lpeg"))
34 assert.is_true(run.luarocks_bool("build --deps-mode=order --tree=" .. testing_paths.testing_tree .. " lxsh")) 34 assert.is_true(run.luarocks_bool("build --deps-mode=order --tree=" .. testing_paths.testing_tree .. " lxsh"))
35 35
36 assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 36 assert.is.falsy(lfs.attributes(testing_paths.testing_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
37 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 37 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
38 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 38 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
39 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 39 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
40 end) 40 end)
41 41
42 it("LuaRocks deps mode order sys", function() 42 it("LuaRocks deps mode order sys", function()
43 assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) 43 assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg"))
44 assert.is_true(run.luarocks_bool("build --deps-mode=order --tree=" .. testing_paths.testing_sys_tree .. " lxsh")) 44 assert.is_true(run.luarocks_bool("build --deps-mode=order --tree=" .. testing_paths.testing_sys_tree .. " lxsh"))
45 45
46 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 46 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
47 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 47 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
48 assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 48 assert.is.falsy(lfs.attributes(testing_paths.testing_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
49 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 49 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
50 end) 50 end)
51 51
52 it("LuaRocks deps mode all sys", function() 52 it("LuaRocks deps mode all sys", function()
53 assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) 53 assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg"))
54 assert.is_true(run.luarocks_bool("build --deps-mode=all --tree=" .. testing_paths.testing_sys_tree .. " lxsh")) 54 assert.is_true(run.luarocks_bool("build --deps-mode=all --tree=" .. testing_paths.testing_sys_tree .. " lxsh"))
55 55
56 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 56 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
57 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 57 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
58 assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 58 assert.is.falsy(lfs.attributes(testing_paths.testing_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
59 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 59 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
60 end) 60 end)
61 61
62 it("LuaRocks deps mode none", function() 62 it("LuaRocks deps mode none", function()
63 assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg")) 63 assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " lpeg"))
64 assert.is_true(run.luarocks_bool("build --deps-mode=none lxsh")) 64 assert.is_true(run.luarocks_bool("build --deps-mode=none lxsh"))
65 65
66 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 66 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
67 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 67 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
68 assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 68 assert.is.falsy(lfs.attributes(testing_paths.testing_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
69 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 69 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
70 end) 70 end)
71 71
72 it("LuaRocks nodeps alias", function() 72 it("LuaRocks nodeps alias", function()
73 assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " --nodeps lxsh")) 73 assert.is_true(run.luarocks_bool("build --tree=" .. testing_paths.testing_tree .. " --nodeps lxsh"))
74 74
75 assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 75 assert.is.falsy(lfs.attributes(testing_paths.testing_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
76 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 76 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
77 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 77 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
78 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 78 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
79 end) 79 end)
80 80
81 it("LuaRocks deps mode make order", function() 81 it("LuaRocks deps mode make order", function()
@@ -89,10 +89,10 @@ describe("LuaRocks deps tests #blackbox #b_deps", function()
89 test_env.remove_dir("lxsh-0.8.6-2") 89 test_env.remove_dir("lxsh-0.8.6-2")
90 assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) 90 assert.is_true(os.remove("lxsh-0.8.6-2.src.rock"))
91 91
92 assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 92 assert.is.falsy(lfs.attributes(testing_paths.testing_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
93 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 93 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
94 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 94 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
95 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 95 assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
96 end) 96 end)
97 97
98 it("LuaRocks deps mode make order sys", function() 98 it("LuaRocks deps mode make order sys", function()
@@ -106,9 +106,9 @@ describe("LuaRocks deps tests #blackbox #b_deps", function()
106 test_env.remove_dir("lxsh-0.8.6-2") 106 test_env.remove_dir("lxsh-0.8.6-2")
107 assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) 107 assert.is_true(os.remove("lxsh-0.8.6-2.src.rock"))
108 108
109 assert.is.truthy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 109 assert.is.truthy(lfs.attributes(testing_paths.testing_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
110 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) 110 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec"))
111 assert.is.falsy(lfs.attributes(testing_paths.testing_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 111 assert.is.falsy(lfs.attributes(testing_paths.testing_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
112 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) 112 assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec"))
113 end) 113 end)
114end) 114end)