aboutsummaryrefslogtreecommitdiff
path: root/spec/write_rockspec_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-09-07 01:07:38 +0300
committerHisham Muhammad <hisham@gobolinux.org>2018-09-07 02:42:15 +0300
commit8840171407a17a6237e193fde3d6a3cc8aee1c4e (patch)
tree7c3fd825f9af121171bbb1b7c59ba964bf5c5e6c /spec/write_rockspec_spec.lua
parentea49b058fb0a2f48ab8b3e3aa2879bbd01a412c9 (diff)
downloadluarocks-8840171407a17a6237e193fde3d6a3cc8aee1c4e.tar.gz
luarocks-8840171407a17a6237e193fde3d6a3cc8aee1c4e.tar.bz2
luarocks-8840171407a17a6237e193fde3d6a3cc8aee1c4e.zip
write_rockspec, init: rename --lua-version to --lua-versions
Fixes conflict between the use of --lua-version in write_rockspec to list supported Lua versions in a rockspec (now renamed to --lua-versions) and the general --lua-version flag used to select a Lua interpreter.
Diffstat (limited to 'spec/write_rockspec_spec.lua')
-rw-r--r--spec/write_rockspec_spec.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/write_rockspec_spec.lua b/spec/write_rockspec_spec.lua
index 1fb53547..35870775 100644
--- a/spec/write_rockspec_spec.lua
+++ b/spec/write_rockspec_spec.lua
@@ -56,14 +56,14 @@ describe("LuaRocks write_rockspec tests #integration", function()
56 56
57 it("runs with format flag", function() 57 it("runs with format flag", function()
58 finally(function() os.remove("testrock-dev-1.rockspec") end) 58 finally(function() os.remove("testrock-dev-1.rockspec") end)
59 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --rockspec-format=1.1 --lua-version=5.1,5.2")) 59 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --rockspec-format=1.1 --lua-versions=5.1,5.2"))
60 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) 60 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec"))
61 -- TODO check contents 61 -- TODO check contents
62 end) 62 end)
63 63
64 it("runs with full flags", function() 64 it("runs with full flags", function()
65 finally(function() os.remove("testrock-dev-1.rockspec") end) 65 finally(function() os.remove("testrock-dev-1.rockspec") end)
66 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --lua-version=5.1,5.2 --license=\"MIT/X11\" " 66 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --lua-versions=5.1,5.2 --license=\"MIT/X11\" "
67 .. " --homepage=\"http://www.luarocks.org\" --summary=\"A package manager for Lua modules\" ")) 67 .. " --homepage=\"http://www.luarocks.org\" --summary=\"A package manager for Lua modules\" "))
68 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) 68 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec"))
69 -- TODO check contents 69 -- TODO check contents
@@ -71,7 +71,7 @@ describe("LuaRocks write_rockspec tests #integration", function()
71 71
72 it("with various flags", function() 72 it("with various flags", function()
73 finally(function() os.remove("testrock-dev-1.rockspec") end) 73 finally(function() os.remove("testrock-dev-1.rockspec") end)
74 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --lib=fcgi --license=\"3-clause BSD\" " .. "--lua-version=5.1,5.2")) 74 assert.is_true(run.luarocks_bool("write_rockspec git://localhost/testrock --lib=fcgi --license=\"3-clause BSD\" " .. "--lua-versions=5.1,5.2"))
75 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec")) 75 assert.is.truthy(lfs.attributes("testrock-dev-1.rockspec"))
76 -- TODO check contents 76 -- TODO check contents
77 end) 77 end)
@@ -88,14 +88,14 @@ describe("LuaRocks write_rockspec tests #integration", function()
88 88
89 it("via http", function() 89 it("via http", function()
90 finally(function() os.remove("an_upstream_tarball-0.1-1.rockspec") end) 90 finally(function() os.remove("an_upstream_tarball-0.1-1.rockspec") end)
91 assert.is_true(run.luarocks_bool("write_rockspec http://localhost:8080/file/an_upstream_tarball-0.1.tar.gz --lua-version=5.1")) 91 assert.is_true(run.luarocks_bool("write_rockspec http://localhost:8080/file/an_upstream_tarball-0.1.tar.gz --lua-versions=5.1"))
92 assert.is.truthy(lfs.attributes("an_upstream_tarball-0.1-1.rockspec")) 92 assert.is.truthy(lfs.attributes("an_upstream_tarball-0.1-1.rockspec"))
93 -- TODO check contents 93 -- TODO check contents
94 end) 94 end)
95 95
96 it("with a different basedir", function() 96 it("with a different basedir", function()
97 finally(function() os.remove("renamed_upstream_tarball-0.1-1.rockspec") end) 97 finally(function() os.remove("renamed_upstream_tarball-0.1-1.rockspec") end)
98 assert.is_true(run.luarocks_bool("write_rockspec http://localhost:8080/file/renamed_upstream_tarball-0.1.tar.gz --lua-version=5.1")) 98 assert.is_true(run.luarocks_bool("write_rockspec http://localhost:8080/file/renamed_upstream_tarball-0.1.tar.gz --lua-versions=5.1"))
99 assert.is.truthy(lfs.attributes("renamed_upstream_tarball-0.1-1.rockspec")) 99 assert.is.truthy(lfs.attributes("renamed_upstream_tarball-0.1-1.rockspec"))
100 -- TODO check contents 100 -- TODO check contents
101 end) 101 end)