diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/quick/test.q | 51 |
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 | ================================================================================ | ||
| 2 | TEST: luarocks test: handle if test.command is not a string | ||
| 3 | |||
| 4 | Regression test for #1055. | ||
| 5 | |||
| 6 | FILE: example-1.0-1.rockspec | ||
| 7 | -------------------------------------------------------------------------------- | ||
| 8 | rockspec_format = "3.0" | ||
| 9 | source = { | ||
| 10 | url = "", | ||
| 11 | } | ||
| 12 | package = "example" | ||
| 13 | version = "1.0-1" | ||
| 14 | test = { | ||
| 15 | type = "command", | ||
| 16 | command = {"./unit.lua"}, | ||
| 17 | } | ||
| 18 | -------------------------------------------------------------------------------- | ||
| 19 | |||
| 20 | RUN: luarocks test | ||
| 21 | EXIT: 1 | ||
| 22 | STDERR: | ||
| 23 | -------------------------------------------------------------------------------- | ||
| 24 | 'command' expects a string | ||
| 25 | -------------------------------------------------------------------------------- | ||
| 26 | |||
| 27 | |||
| 28 | |||
| 29 | ================================================================================ | ||
| 30 | TEST: luarocks test: handle if test.script is not a string | ||
| 31 | |||
| 32 | FILE: example-1.0-1.rockspec | ||
| 33 | -------------------------------------------------------------------------------- | ||
| 34 | rockspec_format = "3.0" | ||
| 35 | source = { | ||
| 36 | url = "", | ||
| 37 | } | ||
| 38 | package = "example" | ||
| 39 | version = "1.0-1" | ||
| 40 | test = { | ||
| 41 | type = "command", | ||
| 42 | script = {"./unit.lua"}, | ||
| 43 | } | ||
| 44 | -------------------------------------------------------------------------------- | ||
| 45 | |||
| 46 | RUN: luarocks test | ||
| 47 | EXIT: 1 | ||
| 48 | STDERR: | ||
| 49 | -------------------------------------------------------------------------------- | ||
| 50 | 'script' expects a string | ||
| 51 | -------------------------------------------------------------------------------- | ||
