aboutsummaryrefslogtreecommitdiff
path: root/test/run
diff options
context:
space:
mode:
authorMarvin Borner2023-04-14 18:02:40 +0200
committerMarvin Borner2023-04-14 18:02:40 +0200
commitf8e807e657766342ae4931d77edce8f1a5d27b56 (patch)
treebf91262a70179c7a1e584631cbb0d3a1cf8826f9 /test/run
parent35702ebb4997f5f1aec25ba1c9ba257f352ea493 (diff)
Added test infrastructure
Diffstat (limited to 'test/run')
-rwxr-xr-xtest/run15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/run b/test/run
new file mode 100755
index 0000000..e587660
--- /dev/null
+++ b/test/run
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+FAIL="\033[0;31m[FAIL]\033[0m "
+SUCC="\033[0;32m[SUCC]\033[0m "
+
+for file in *.blc; do
+ ../build/bloc --from-blc -i "$file" -o ../build/"$file".bloc
+ ../build/bloc --from-bloc -d -i ../build/"$file".bloc -o ../build/"$file" >../build/"$file".dump
+ cmp "$file" ../build/"$file" && printf "$SUCC" || printf "$FAIL"
+ echo "blc cmp on $file"
+ cmp "$file".dump ../build/"$file".dump && printf "$SUCC" || printf "$FAIL"
+ echo "bloc dump cmp on $file"
+done