summaryrefslogtreecommitdiffstats
path: root/test.sh
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-07-26 17:44:50 +0200
committerLouis Burda <quent.burda@gmail.com>2023-07-26 17:44:50 +0200
commitce2b644f251d5b22dc2228a0ffc8479408c49c38 (patch)
tree78b2f7005499c65858f2372f64ccad95bf369032 /test.sh
parent317ef5cfe36ddb9b9ab205826132ddd227a3db01 (diff)
downloadtis100-ce2b644f251d5b22dc2228a0ffc8479408c49c38.tar.gz
tis100-ce2b644f251d5b22dc2228a0ffc8479408c49c38.zip
Add testing
Diffstat (limited to 'test.sh')
-rw-r--r--test.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100644
index 0000000..ad786c7
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+
+for f in test/*.asm; do
+ in="$(echo "$f" | cut -d. -f1).in"
+ out="$(echo "$f" | cut -d. -f1).out"
+ tmp="/tmp/tis-test.out"
+ ./tis-as "$f" "$in" "$tmp"
+ if [ $? -ne 0 ]; then
+ echo "$f"
+ elif ! diff "$out" "$tmp"; then
+ cat "$tmp" | xxd 1>&2
+ cat "$out" | xxd 1>&2
+ echo "$f"
+ fi
+done