aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-02-21 01:23:59 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-02-21 04:19:36 -0300
commita75d447e10bb7842cdbed0bb494697ddd88fd455 (patch)
tree6fb79505261f825ad1818f938d31a65c0d6b6409 /spec
parent28265438538f8298fdaa7a6e74f4ea3a40fb11a5 (diff)
downloadluarocks-a75d447e10bb7842cdbed0bb494697ddd88fd455.tar.gz
luarocks-a75d447e10bb7842cdbed0bb494697ddd88fd455.tar.bz2
luarocks-a75d447e10bb7842cdbed0bb494697ddd88fd455.zip
fix: handle error if test.command is not a string.
Fixes #1055.
Diffstat (limited to 'spec')
-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 00000000..cb5ccd79
--- /dev/null
+++ b/spec/quick/test.q
@@ -0,0 +1,51 @@
1================================================================================
2TEST: luarocks test: handle if test.command is not a string
3
4Regression test for #1055.
5
6FILE: example-1.0-1.rockspec
7--------------------------------------------------------------------------------
8rockspec_format = "3.0"
9source = {
10 url = "",
11}
12package = "example"
13version = "1.0-1"
14test = {
15 type = "command",
16 command = {"./unit.lua"},
17}
18--------------------------------------------------------------------------------
19
20RUN: luarocks test
21EXIT: 1
22STDERR:
23--------------------------------------------------------------------------------
24'command' expects a string
25--------------------------------------------------------------------------------
26
27
28
29================================================================================
30TEST: luarocks test: handle if test.script is not a string
31
32FILE: example-1.0-1.rockspec
33--------------------------------------------------------------------------------
34rockspec_format = "3.0"
35source = {
36 url = "",
37}
38package = "example"
39version = "1.0-1"
40test = {
41 type = "command",
42 script = {"./unit.lua"},
43}
44--------------------------------------------------------------------------------
45
46RUN: luarocks test
47EXIT: 1
48STDERR:
49--------------------------------------------------------------------------------
50'script' expects a string
51--------------------------------------------------------------------------------