1
1
mirror of https://github.com/wader/fq.git synced 2024-12-28 08:02:28 +03:00
fq/pkg/interp/testdata/incudepath.fqtest

27 lines
617 B
Plaintext
Raw Normal View History

2021-08-14 20:50:17 +03:00
/library/a.jq:
def a: "a";
/config/has_error.jq:
)
2021-08-14 20:50:17 +03:00
$ fq -L /library -n 'include "a"; a'
"a"
2021-09-05 14:38:13 +03:00
$ fq --include-path /library -n 'include "a"; a'
"a"
$ fq -L /wrong -L /library -n 'include "a"; a'
"a"
$ fq -n 'include "/library/a"; a'
"a"
2021-08-14 20:50:17 +03:00
$ fq -L /wrong -n 'include "a"; a'
exitcode: 3
stderr:
error: arg: open a.jq: file does not exist
$ fq -n 'include "@config/a";'
exitcode: 3
stderr:
error: arg: open testdata/config/a.jq: no such file or directory
$ fq -n 'include "@config/missing?";'
null
$ fq -n 'include "@config/has_error?";'
exitcode: 3
stderr:
error: arg: /config/has_error.jq:1:1: parse: unexpected token ")"