summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMuh Muhten <muh.muhten@gmail.com>2019-02-25 23:53:21 -0500
committerNico Williams <nico@cryptonector.com>2019-02-26 11:05:25 -0600
commit6a0bdf6063407c234292beffd000667acc2ef46b (patch)
tree6f4c45202558577b2268e7a7e3bd9782bab5e2cc /tests
parent36c250a03dfde80d6667c1c578e7e488b8d9caab (diff)
Remove scalars_or_empty
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shtest2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/shtest b/tests/shtest
index fc2ef152..a4fec6d6 100755
--- a/tests/shtest
+++ b/tests/shtest
@@ -155,7 +155,7 @@ cmp $d/out $d/expected
## If we add an option to stream to the `import ... as $symbol;` directive
## then we can move these tests into tests/all.test.
-$VALGRIND $Q $JQ -c '. as $d|path(..) as $p|$d|getpath($p)|scalars_or_empty|[$p,.]' < "$JQTESTDIR/torture/input0.json" > $d/out0
+$VALGRIND $Q $JQ -c '. as $d|path(..) as $p|$d|getpath($p)|select((type|. != "array" and . != "object") or length==0)|[$p,.]' < "$JQTESTDIR/torture/input0.json" > $d/out0
$VALGRIND $Q $JQ --stream -c '.|select(length==2)' < "$JQTESTDIR/torture/input0.json" > $d/out1
diff $d/out0 $d/out1