diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-16 15:43:09 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-16 15:43:09 +0200 |
| commit | 30b43f08955158d4f2066f4b50fe8d1241b3177b (patch) | |
| tree | f2280c40a9ee721ac3223ec27e9ddbec6db224df /test/test.sh | |
| parent | c2f3b1c9c534cadc81ebab3e718832d121cdf9cf (diff) | |
| download | nissy-core-30b43f08955158d4f2066f4b50fe8d1241b3177b.tar.gz nissy-core-30b43f08955158d4f2066f4b50fe8d1241b3177b.zip | |
Remove configure + make build system.
This commit also updates the README, cleans up some stuff and fixes
some oopsies.
Diffstat (limited to 'test/test.sh')
| -rwxr-xr-x | test/test.sh | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/test/test.sh b/test/test.sh deleted file mode 100755 index 8b5db35..0000000 --- a/test/test.sh +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | re="${TEST:-$@}" | ||
| 4 | |||
| 5 | TESTBIN="test/run" | ||
| 6 | TESTOUT="test/last.out" | ||
| 7 | TESTERR="test/last.err" | ||
| 8 | |||
| 9 | for t in test/*; do | ||
| 10 | if [ -n "$re" ] && !(echo "$t" | grep -q "$re"); then | ||
| 11 | continue | ||
| 12 | fi | ||
| 13 | |||
| 14 | # Verify if $t is a directory and if its name starts with three digits | ||
| 15 | if [ -d "$t" ] && basename "$t" | grep -Eq '^[0-9]{3}'; then | ||
| 16 | $CC -o $TESTBIN "$t"/*.c $OBJ || exit 1 | ||
| 17 | for cin in "$t"/*.in; do | ||
| 18 | c=$(echo "$cin" | sed 's/\.in//') | ||
| 19 | cout="$c.out" | ||
| 20 | printf "%s: " "$c" | ||
| 21 | $TESTBIN < "$cin" > $TESTOUT 2> $TESTERR | ||
| 22 | if diff "$cout" "$TESTOUT"; then | ||
| 23 | printf "OK\n" | ||
| 24 | else | ||
| 25 | printf "Test failed! stderr:\n" | ||
| 26 | cat $TESTERR | ||
| 27 | exit 1 | ||
| 28 | fi | ||
| 29 | done | ||
| 30 | fi | ||
| 31 | done | ||
| 32 | |||
| 33 | echo "All tests passed!" | ||
