aboutsummaryrefslogtreecommitdiff
path: root/test/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.sh')
-rwxr-xr-xtest/test.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/test.sh b/test/test.sh
index bd7f430..9aeeac9 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -25,16 +25,18 @@ for ALGORITHM in $ALGORITHMS; do
for TEST_FILE in "$DATA_DIR"/*; do
total=$((total + 1))
FILE_NAME=$(basename "$TEST_FILE")
- echo "Testing $FILE_NAME with $ALGORITHM ..."
+
+ echo -n "Testing $FILE_NAME with $ALGORITHM ... "
"$SORTER" -a "$ALGORITHM" "$TEST_FILE" > temp
- OUTPUT=$(python ./check.py "$TEST_FILE" temp 2>&1)
+ python ./check.py "$TEST_FILE" temp >/dev/null 2>&1
+ status=$?
- if [ -z "$OUTPUT" ]; then
- echo "Passed: $FILE_NAME"
+ if [ $status -eq 0 ]; then
+ echo "✅Passed"
passed=$((passed + 1))
else
- echo "Failed: $FILE_NAME"
+ echo "❎Failed (code $status)"
failed=$((failed + 1))
fi
done