1
1
mirror of https://github.com/wader/fq.git synced 2024-11-24 11:16:09 +03:00
fq/pkg/interp/testdata/exitcode.fqtest

27 lines
520 B
Plaintext
Raw Normal View History

2021-08-14 01:11:57 +03:00
$ fq
exitcode: 2
stderr:
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
2021-08-13 17:40:28 +03:00
$ fq -n '1+"a"'
2020-06-08 03:29:51 +03:00
exitcode: 5
stderr:
error: cannot add: number (1) and string ("a")
2021-08-13 17:40:28 +03:00
$ fq -n '"abc" | halt_error(123)'
2020-06-08 03:29:51 +03:00
exitcode: 123
stderr:
error: abc
2021-08-13 17:40:28 +03:00
$ fq -n 'null | halt_error(123)'
2020-06-08 03:29:51 +03:00
exitcode: 123
2021-08-13 17:40:28 +03:00
$ fq -n invalid
2020-06-08 03:29:51 +03:00
exitcode: 3
stderr:
2021-08-18 19:47:13 +03:00
error: arg:1:0: function not defined: invalid/0
2021-08-13 17:40:28 +03:00
$ fq -n "("
2020-06-08 03:29:51 +03:00
exitcode: 3
stderr:
2021-08-18 19:47:13 +03:00
error: arg:1:2: unexpected token <EOF>
2021-08-13 17:40:28 +03:00
$ fq . non-existing
2020-06-08 03:29:51 +03:00
exitcode: 2
stderr:
error: open testdata/non-existing: no such file or directory