1
1
mirror of https://github.com/wader/fq.git synced 2024-11-27 06:04:47 +03:00
fq/pkg/interp/testdata/debug.fqtest
Mattias Wadman a3cfcd0ad2 interp: Add stderr again for jq compat
Also add tests for print* and stderr
2022-01-07 11:30:09 +01:00

44 lines
574 B
Plaintext

$ fq -i
null> {a: 123, b: []} | debug
{
"a": 123,
"b": []
}
null> {a: 123, b: []} | debug({a})
{
"a": 123,
"b": []
}
null> ^D
stderr:
["DEBUG",{"a":123,"b":[]}]
["DEBUG",{"a":123}]
$ fq -n 'null, {a:1}, "abc" | ., "\n" | print'
null
{"a":1}
abc
$ fq -n 'null, {a:1}, "abc" | println'
null
{"a":1}
abc
$ fq -n 'null, {a:1}, "abc" | ., "\n" | printerr'
stderr:
null
{"a":1}
abc
$ fq -n 'null, {a:1}, "abc" | printerrln'
stderr:
null
{"a":1}
abc
$ fq -n 'null, {a:1}, "abc" | ., "\n" | stderr'
null
"\n"
{
"a": 1
}
"\n"
"abc"
"\n"
stderr:
null"\n"{"a":1}"\n""abc""\n"