summaryrefslogtreecommitdiff
path: root/spec/quick/test.q
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2025-02-03 21:29:42 +0100
committerMike Vink <mike@pionative.com>2025-02-03 21:29:42 +0100
commit5155816b7b925dec5d5feb1568b1d7ceb00938b9 (patch)
treedeca28ea15e79f6f804c3d90d2ba757881638af5 /spec/quick/test.q
fetch tarballHEADmaster
Diffstat (limited to 'spec/quick/test.q')
-rw-r--r--spec/quick/test.q51
1 files changed, 51 insertions, 0 deletions
diff --git a/spec/quick/test.q b/spec/quick/test.q
new file mode 100644
index 0000000..cb5ccd7
--- /dev/null
+++ b/spec/quick/test.q
@@ -0,0 +1,51 @@
+================================================================================
+TEST: luarocks test: handle if test.command is not a string
+
+Regression test for #1055.
+
+FILE: example-1.0-1.rockspec
+--------------------------------------------------------------------------------
+rockspec_format = "3.0"
+source = {
+ url = "",
+}
+package = "example"
+version = "1.0-1"
+test = {
+ type = "command",
+ command = {"./unit.lua"},
+}
+--------------------------------------------------------------------------------
+
+RUN: luarocks test
+EXIT: 1
+STDERR:
+--------------------------------------------------------------------------------
+'command' expects a string
+--------------------------------------------------------------------------------
+
+
+
+================================================================================
+TEST: luarocks test: handle if test.script is not a string
+
+FILE: example-1.0-1.rockspec
+--------------------------------------------------------------------------------
+rockspec_format = "3.0"
+source = {
+ url = "",
+}
+package = "example"
+version = "1.0-1"
+test = {
+ type = "command",
+ script = {"./unit.lua"},
+}
+--------------------------------------------------------------------------------
+
+RUN: luarocks test
+EXIT: 1
+STDERR:
+--------------------------------------------------------------------------------
+'script' expects a string
+--------------------------------------------------------------------------------