Skip to content

Commit b5b2213

Browse files
committed
[fda] Also compare program exit status values in test script.
Just being paranoid. Signed-off-by: Ben Pfaff <blp@feldera.com>
1 parent 84d569d commit b5b2213

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

crates/fda/test.bash

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,19 @@ fail_on_success() {
1616

1717
compare_output() {
1818
# Capture the output of both commands
19-
output1=`$1`
20-
output2=`$2`
19+
output1=`$1`; status1=$?
20+
output2=`$2`; status2=$?
2121

2222
# Compare the outputs
23-
if [ "$output1" = "$output2" ]; then
24-
return 0
25-
else
23+
if [ "$output1" != "$output2" ]; then
2624
echo "The outputs are different."
2725
exit 1
2826
fi
27+
if [ $status1 != $status2 ]; then
28+
echo "Status values differ: $status1 != $status2"
29+
exit 1
30+
fi
31+
return 0
2932
}
3033

3134
fda() {

0 commit comments

Comments
 (0)