Skip to content

Commit 4a156f3

Browse files
committed
tests/test_common.sh.in: fixed obsolete syntax
1 parent 0b4b37c commit 4a156f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_common.sh.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function test_run {
8686
echo -e "RESULT: PASSED\n" >&2
8787
return 0;
8888
elif [ $ret_val -eq 1 ]; then
89-
result=$[$result + $ret_val]
89+
result=$(($result + $ret_val))
9090
echo "[ FAIL ]";
9191
echo -e "RESULT: FAILED\n" >&2
9292
return 1;
@@ -95,7 +95,7 @@ function test_run {
9595
echo -e "RESULT: SKIPPED\n" >&2
9696
return 0;
9797
else
98-
result=$[$result + $ret_val]
98+
result=$(($result + $ret_val))
9999
echo "[ WARN ]";
100100
echo -e "RESULT: WARNING (unknown exist status $ret_val)\n" >&2
101101
return 1;
@@ -174,10 +174,10 @@ function verify_results {
174174

175175
if [ ! $RES = $CMT ]; then
176176
echo "Result of ${OVAL_ID} should be ${CMT} and is ${RES}"
177-
ret_val=$[$ret_val + 1]
177+
ret_val=$(($ret_val + 1))
178178
fi
179-
180-
ID=$[$ID+1]
179+
180+
ID=$(($ID+1))
181181
done
182182

183183
return $([ $ret_val -eq 0 ])

0 commit comments

Comments
 (0)