aboutsummaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authormithe24 <mithe24@student.sdu.dk>2025-10-13 13:11:52 +0200
committermithe24 <mithe24@student.sdu.dk>2025-10-29 13:49:57 +0100
commitee72f7d494f3d221a1f066dc96485d0cc1838a21 (patch)
tree8dcf8c8d7b67b976e65ad4ec9bdf4cadc8f4511d /test.sh
parent68102a57cf31a97561407f3e1d3265ba0ba545d3 (diff)
downloadsorter-ee72f7d494f3d221a1f066dc96485d0cc1838a21.tar.gz
sorter-ee72f7d494f3d221a1f066dc96485d0cc1838a21.zip
update to-do
Diffstat (limited to '')
-rwxr-xr-xtest.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/test.sh b/test.sh
index 0a1f6b8..8cf9240 100755
--- a/test.sh
+++ b/test.sh
@@ -1,7 +1,6 @@
#!/bin/sh
-TEST_DIR="test"
-DATA_DIR="$TEST_DIR/data"
+DATA_DIR="data"
SRC_DIR="src"
SORTER="$SRC_DIR/sorter"
@@ -14,10 +13,11 @@ failed=0
for TEST_FILE in "$DATA_DIR"/*; do
((total++))
FILE_NAME=$(basename "$TEST_FILE")
- DIFF_FILE="$TEST_DIR/$FILE_NAME.diff"
+ DIFF_FILE="$FILE_NAME.diff"
- diff -u <($REF "$TEST_FILE") <($SORTER "$TEST_FILE") > "$DIFF_FILE"
+ echo "Testing $FILE_NAME ..."
+ diff -u <($REF "$TEST_FILE") <($SORTER "$TEST_FILE") > "$DIFF_FILE"
if [ ! -s "$DIFF_FILE" ]; then
echo "Passed: $TEST_FILE"
((passed++))
@@ -37,5 +37,5 @@ echo "Failed: $failed"
echo "=============================="
if [ $failed -ne 0 ]; then
- echo "Diff files for failed tests are saved in $TEST_DIR/"
+ echo "Diff files for failed tests are saved"
fi