summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am6
-rwxr-xr-xtest/run-test-001.sh7
-rwxr-xr-xtest/run-test-002.sh9
-rwxr-xr-xtest/true-001.sh3
4 files changed, 25 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 8b04cb8..a478a8b 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,6 +1,12 @@
AUTOMAKE_OPTIONS = foreign
+TESTS = \
+ true-001.sh \
+ run-test-001.sh \
+ run-test-002.sh
+
check_PROGRAMS = run-test
+check_SCRIPTS = $(TESTS)
run_test_SOURCES = run-test.c
diff --git a/test/run-test-001.sh b/test/run-test-001.sh
new file mode 100755
index 0000000..9c1a962
--- /dev/null
+++ b/test/run-test-001.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ "$1" = 'actual' -o "$1" = 'expected' ]; then
+ echo 42
+else
+ ./run-test "$0"
+fi
diff --git a/test/run-test-002.sh b/test/run-test-002.sh
new file mode 100755
index 0000000..6a10101
--- /dev/null
+++ b/test/run-test-002.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$1" = 'actual' ]; then
+ echo 23
+elif [ "$1" = 'expected' ]; then
+ echo 42
+else
+ ./run-test "!$0"
+fi
diff --git a/test/true-001.sh b/test/true-001.sh
new file mode 100755
index 0000000..296ef78
--- /dev/null
+++ b/test/true-001.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+true