2021-08-14 20:50:17 +03:00
|
|
|
/library/a.jq:
|
|
|
|
def a: "a";
|
2022-02-11 14:57:21 +03:00
|
|
|
/config/has_error.jq:
|
|
|
|
)
|
2022-05-21 20:33:52 +03:00
|
|
|
$ fq -L library -n 'include "a"; a'
|
2021-08-14 20:50:17 +03:00
|
|
|
"a"
|
2022-05-21 20:33:52 +03:00
|
|
|
$ fq --include-path library -n 'include "a"; a'
|
2021-09-05 14:38:13 +03:00
|
|
|
"a"
|
2022-05-21 20:33:52 +03:00
|
|
|
$ fq -L /wrong -L library -n 'include "a"; a'
|
2021-09-05 14:38:13 +03:00
|
|
|
"a"
|
2021-10-26 12:02:30 +03:00
|
|
|
$ fq -n 'include "/library/a"; a'
|
|
|
|
"a"
|
2022-05-17 19:04:27 +03:00
|
|
|
$ fq -n 'include "./library/a"; a'
|
|
|
|
"a"
|
2022-05-21 20:33:52 +03:00
|
|
|
$ fq -L wrong -n 'include "a"; a'
|
2021-08-14 20:50:17 +03:00
|
|
|
exitcode: 3
|
|
|
|
stderr:
|
2022-02-18 02:47:17 +03:00
|
|
|
error: arg: open a.jq: file does not exist
|
2022-02-11 14:57:21 +03:00
|
|
|
$ fq -n 'include "@config/a";'
|
|
|
|
exitcode: 3
|
|
|
|
stderr:
|
2022-02-18 02:47:17 +03:00
|
|
|
error: arg: open testdata/config/a.jq: no such file or directory
|
2022-02-11 14:57:21 +03:00
|
|
|
$ fq -n 'include "@config/missing?";'
|
|
|
|
null
|
|
|
|
$ fq -n 'include "@config/has_error?";'
|
|
|
|
exitcode: 3
|
|
|
|
stderr:
|
2022-02-18 02:47:17 +03:00
|
|
|
error: arg: /config/has_error.jq:1:1: parse: unexpected token ")"
|