1
1
mirror of https://github.com/wader/fq.git synced 2024-12-02 04:05:35 +03:00
fq/pkg/interp/testdata/string_input.fqtest
Mattias Wadman 377af133e0 fqtest: Cleanup path usage
Make cwd for a test script the directory where the script is.
Use relative paths
2022-05-21 20:03:25 +02:00

66 lines
595 B
Plaintext

# TODO: test for jq -R . <(echo -ne 'a\nb') <(echo c) produces "a" and "bc"
/a:
a
b
/c:
c
$ fq -R . a c
"a"
"b"
"c"
$ fq -Rs . a c
"a\nb\nc\n"
$ fq -nRs input a c
"a\nb\nc\n"
$ fq -nRs inputs a c
"a\nb\nc\n"
$ fq -R
"a"
"b"
"c"
stdin:
a
b
c
$ fq -nR input
"a"
stdin:
a
b
c
$ fq -nR inputs
"a"
"b"
"c"
stdin:
a
b
c
$ fq -Rs
"a\nb\nc\n"
stdin:
a
b
c
$ fq -nRs input
"a\nb\nc\n"
stdin:
a
b
c
$ fq -nRs inputs
"a\nb\nc\n"
stdin:
a
b
c
$ fq -R . missing
exitcode: 2
stderr:
error: missing: no such file or directory
$ fq -Rs . missing
""
exitcode: 2
stderr:
error: missing: no such file or directory