Skip to content

Commit

Permalink
Change tests to test both exec/2 and system/2
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicToast committed Jun 25, 2024
1 parent a359afe commit 51a620c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/shtest
Original file line number Diff line number Diff line change
Expand Up @@ -692,12 +692,12 @@ NUM
# exec is tested by executing jq
if ! $msys && ! $mingw; then
now=$(date +%s)
if ! r=$($VALGRIND $Q $JQ -rn 'exec("'"$JQ_NO_B"'"; ["-rn", "'"$now"'"]) | trim') ||
if ! r=$($VALGRIND $Q $JQ -rn 'exec("'"$JQ_NO_B"'"; ["-rn", "'"$now"'"]) | .out | rtrim') ||
[ "$r" != "$now" ] ; then
echo "exec didn't pipe stdout correctly: expected $now but got $r"
exit 1
fi
if ! r=$(echo "$now" | $VALGRIND $Q $JQ -r 'exec("'"$JQ_NO_B"'"; ["-r", "."]) | trim') ||
if ! r=$(echo "$now" | $VALGRIND $Q $JQ -r 'system("'"$JQ_NO_B"'"; ["-r", "."])') ||
[ "$r" != "$now" ]; then
echo "exec didn't pipe input correctly: expected $now but got $r"
exit 1
Expand Down

0 comments on commit 51a620c

Please sign in to comment.