Skip to content

Commit 0a0b555

Browse files
committed
Quick Save
1 parent b1bf554 commit 0a0b555

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test_cmds.bash

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,19 +531,25 @@ function test_findfile(){
531531

532532
function test_jsoncols(){
533533
if [ -f temp.txt ]; then rm temp.txt; fi
534-
jsoncols -i demos/jsomcols/myblob.json -o temp.txt .name
534+
jsoncols -i demos/jsoncols/myblob.json -o temp.txt .name
535535
assert_exists "test_jsoncols (-i, -o)" temp.txt
536+
R=$(cmp demos/jsoncols/result1.txt temp.txt)
537+
assert_empty "test_jsoncols (result1)" "$R"
536538

537539
if [ -f temp.txt ]; then rm temp.txt; fi
538-
jsoncols -i demos/jsoncols/myblob.json -d\| .name .age > temp.txt
540+
jsoncols -i demos/jsoncols/myblob.json -d '|' .name .age > temp.txt
539541
assert_exists "test_jsoncols (-i, -d)" temp.txt
542+
R=$(cmp demos/jsoncols/result2.txt temp.txt)
543+
assert_empty "test_jsoncols (result2)" "$R"
540544

541545
if [ -f temp.txt ]; then rm temp.txt; fi
542546
cat demos/jsoncols/myblob.json | jsoncols .name .email .age > temp.txt
543547
assert_exists "test_jsoncols (pipeline)" temp.txt
548+
R=$(cmp demos/jsoncols/result3.txt temp.txt)
549+
assert_empty "test_jsoncols (result3)" "$R"
544550

545551
if [ -f temp.txt ]; then rm temp.txt; fi
546-
echo "test_jsoncols skipping, not implemented";
552+
echo "test_jsoncols OK";
547553
}
548554

549555
function test_jsonjoin(){

0 commit comments

Comments
 (0)