aboutsummaryrefslogtreecommitdiff
path: root/spec/quick/test.q
blob: cb5ccd794f166343a54d8d59017565f4bad54222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
--------------------------------------------------------------------------------