aboutsummaryrefslogtreecommitdiffstats
path: root/test/run-test-002.sh
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-01-21 14:11:37 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2012-01-22 00:13:35 +0100
commit31b4c71eb2610471cb0598338f510633f407477f (patch)
treecbb668969a7cc63c6908662c6894068aa71ad08d /test/run-test-002.sh
parentd34e6502e91e9a301ce6b1c023adc881dbfe889c (diff)
downloadcalcurse-31b4c71eb2610471cb0598338f510633f407477f.tar.gz
calcurse-31b4c71eb2610471cb0598338f510633f407477f.zip
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'test/run-test-002.sh')
-rwxr-xr-xtest/run-test-002.sh9
1 files changed, 9 insertions, 0 deletions
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