1
1
mirror of https://github.com/wader/fq.git synced 2024-12-26 23:15:04 +03:00
fq/pkg/interp/testdata/exitcode.fqtest
Mattias Wadman 691688022f fqtest: Refactor our script part to own package
Hopefully can be reused for docs generation
2021-10-06 18:49:03 +02:00

27 lines
520 B
Plaintext

$ fq
exitcode: 2
stderr:
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
$ fq -n '1+"a"'
exitcode: 5
stderr:
error: cannot add: number (1) and string ("a")
$ fq -n '"abc" | halt_error(123)'
exitcode: 123
stderr:
error: abc
$ fq -n 'null | halt_error(123)'
exitcode: 123
$ fq -n invalid
exitcode: 3
stderr:
error: arg:1:0: function not defined: invalid/0
$ fq -n "("
exitcode: 3
stderr:
error: arg:1:2: unexpected token <EOF>
$ fq . non-existing
exitcode: 2
stderr:
error: open testdata/non-existing: no such file or directory