aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/quick/build.q40
-rw-r--r--spec/quick/install.q42
2 files changed, 82 insertions, 0 deletions
diff --git a/spec/quick/build.q b/spec/quick/build.q
index c6ca433c..a1731da2 100644
--- a/spec/quick/build.q
+++ b/spec/quick/build.q
@@ -120,3 +120,43 @@ failed to force the lock
120-------------------------------------------------------------------------------- 120--------------------------------------------------------------------------------
121 121
122NOT_EXISTS: %{testing_sys_rocks}/a_rock/1.0-1/a_rock-1.0-1.rockspec 122NOT_EXISTS: %{testing_sys_rocks}/a_rock/1.0-1/a_rock-1.0-1.rockspec
123
124
125
126================================================================================
127TEST: luarocks build: do not rebuild when already installed
128
129FILE: a_rock-1.0-1.rockspec
130--------------------------------------------------------------------------------
131rockspec_format = "3.0"
132package = "a_rock"
133version = "1.0-1"
134source = {
135 url = "file://%{url(%{fixtures_dir})}/a_rock.lua"
136}
137description = {
138 summary = "An example rockspec",
139}
140dependencies = {
141 "lua >= 5.1"
142}
143build = {
144 modules = {
145 build = "a_rock.lua"
146 },
147}
148--------------------------------------------------------------------------------
149RUN: luarocks build a_rock-1.0-1.rockspec
150
151RUN: luarocks show a_rock
152STDOUT:
153--------------------------------------------------------------------------------
154a_rock 1.0
155--------------------------------------------------------------------------------
156
157RUN: luarocks build a_rock-1.0-1.rockspec
158STDOUT:
159--------------------------------------------------------------------------------
160a_rock 1.0-1 is already installed
161Use --force to reinstall
162--------------------------------------------------------------------------------
diff --git a/spec/quick/install.q b/spec/quick/install.q
index ab576605..503aaacc 100644
--- a/spec/quick/install.q
+++ b/spec/quick/install.q
@@ -373,3 +373,45 @@ RUN: luarocks install myrock-1.0-2.all.rock --no-doc
373 373
374EXISTS: %{testing_sys_tree}/share/lua/%{LUA_VERSION}/sailor/blank-app/.htaccess 374EXISTS: %{testing_sys_tree}/share/lua/%{LUA_VERSION}/sailor/blank-app/.htaccess
375NOT_EXISTS: %{testing_sys_tree}/share/lua/%{LUA_VERSION}/sailor/blank-app/.htaccess~ 375NOT_EXISTS: %{testing_sys_tree}/share/lua/%{LUA_VERSION}/sailor/blank-app/.htaccess~
376
377
378
379================================================================================
380TEST: do not reinstall when already installed
381
382FILE: myrock-1.0-1.rockspec
383--------------------------------------------------------------------------------
384rockspec_format = "3.0"
385package = "myrock"
386version = "1.0-1"
387source = {
388 url = "file://%{url(tmpdir)}/rock.lua"
389}
390build = {
391 modules = { rock = "rock.lua" }
392}
393--------------------------------------------------------------------------------
394
395FILE: rock.lua
396--------------------------------------------------------------------------------
397return "hello"
398--------------------------------------------------------------------------------
399
400RUN: luarocks build myrock-1.0-1.rockspec
401RUN: luarocks pack myrock
402RUN: luarocks remove myrock
403
404RUN: luarocks install ./myrock-1.0-1.all.rock
405
406RUN: luarocks show myrock
407STDOUT:
408--------------------------------------------------------------------------------
409myrock 1.0
410--------------------------------------------------------------------------------
411
412RUN: luarocks install ./myrock-1.0-1.all.rock
413STDOUT:
414--------------------------------------------------------------------------------
415myrock 1.0-1 is already installed
416Use --force to reinstall
417--------------------------------------------------------------------------------