From 31b4c71eb2610471cb0598338f510633f407477f Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 21 Jan 2012 14:11:37 +0100 Subject: test/: Add three basic self tests * true-001.sh: Always returns true - this should never ever fail. * run-test-001.sh: Invokes run-test, passing itself as a parameter. Subsequently, it outputs the very same (hardcoded) expected and actual values. * run-test-002.sh: Tests run-test's negative assertion feature in a way similar to run-test-001.sh. However, output different (hardcoded) expected and actual values and invoke run-test with the negative test prefix ('!'). Signed-off-by: Lukas Fleischer --- test/run-test-001.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 test/run-test-001.sh (limited to 'test/run-test-001.sh') 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 -- cgit v1.2.3