1
1
mirror of https://github.com/wader/fq.git synced 2024-12-27 07:24:48 +03:00
fq/pkg/interp/testdata/exitcode.fqtest

27 lines
494 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:
error: arg: 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:
error: arg:1:1: unexpected EOF
2021-08-13 17:40:28 +03:00
$ fq . non-existing
2020-06-08 03:29:51 +03:00
exitcode: 2
stderr:
error: non-existing: no such file or directory