* 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>
10 lines
120 B
Bash
Executable File
10 lines
120 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ "$1" = 'actual' ]; then
|
|
echo 23
|
|
elif [ "$1" = 'expected' ]; then
|
|
echo 42
|
|
else
|
|
./run-test "!$0"
|
|
fi
|