Skip to content

Commit 423445a

Browse files
committed
Added set -e to unit test scripts.
1 parent d808292 commit 423445a

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

test/BENCH/test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env sh
2-
2+
set -e
33
INTERP=${INTERP:-lua}
44
SCRIPT="BENCH.LUA"
55

6-
cd ../../core || die
6+
cd ../../core
77
echo | $INTERP $SCRIPT 1980
8-
cd ../bench || die
8+
cd ../bench
99
echo | $INTERP $SCRIPT 1980
1010
echo "BENCH: PASS"

test/DIFF/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env sh
2-
2+
set -e
33
INTERP=${INTERP:-lua}
44
SCRIPT="../DIFF.LUA"
55
FAIL=0
66

77
test_case() {
88
mkdir -p result
99
cp "case$1"/* result
10-
cd "result" || die
10+
cd "result"
1111
$INTERP $SCRIPT a.txt b.txt > "diff"
1212
patch -s --posix --batch -p0 < "diff"
1313
if cmp -s a.txt b.txt; then
@@ -16,11 +16,11 @@ test_case() {
1616
printf "\tCASE %s: FAIL\n" "$1"
1717
FAIL=$((FAIL + 1))
1818
fi
19-
cd .. || die
19+
cd ..
2020
rm -R result
2121
}
2222
echo "DIFF:"
2323
for i in $(seq -w 1 16); do test_case "$i"; done
2424
echo ""
25-
if [ $FAIL -gt 0 ]; then echo "DIFF: $FAIL FAIL" exit 1; fi
25+
if [ $FAIL -gt 0 ]; then echo "DIFF: $FAIL FAIL"; exit 1; fi
2626
echo "DIFF: ALL PASS"

test/FATSTAT/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
2+
set -e
33
INTERP=${INTERP:-lua}
44
TEST="FATSTAT"
55
SCRIPT="FATSTAT.LUA"

test/MD5SUM/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
2+
set -e
33
INTERP=${INTERP:-lua}
44
TEST="MD5SUM"
55
SCRIPT="MD5SUM.LUA"

test/S256SUM/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
2+
set -e
33
INTERP=${INTERP:-lua}
44
TEST="S256SUM"
55
SCRIPT="S256SUM.LUA"

test/TICTAC/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
2-
2+
set -e
33
INTERP=${INTERP:-lua}
44
SCRIPT="TICTAC.LUA"
55

0 commit comments

Comments
 (0)