]> thyrsus.com Git - src.git/commitdiff
First version of tester.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 16:11:08 +0000 (11:11 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 16:11:08 +0000 (11:11 -0500)
srctest [new file with mode: 0755]

diff --git a/srctest b/srctest
new file mode 100755 (executable)
index 0000000..6622610
--- /dev/null
+++ b/srctest
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Regression tester for SRC.
+#
+trap "rm -f testfile*" 0 1 2 15
+
+check() {
+    case $? in
+       0) echo "srctest: $1 succeeded";;
+       *) echo "srctest: $1 failed"; exit 1;;
+    esac
+}
+
+# Catches dumb and obvious case of code having a Python syntax error
+src >>/dev/null 2>&1
+check "smoketest"
+
+cat >testfile$$ <<EOF
+Now is the time
+EOF
+
+# end