diff options
Diffstat (limited to '')
-rwxr-xr-x | fluent-bit/tests/lib/shunit2/examples/math_test.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/fluent-bit/tests/lib/shunit2/examples/math_test.sh b/fluent-bit/tests/lib/shunit2/examples/math_test.sh new file mode 100755 index 00000000..c6d00299 --- /dev/null +++ b/fluent-bit/tests/lib/shunit2/examples/math_test.sh @@ -0,0 +1,25 @@ +#! /bin/sh +# file: examples/math_test.sh + +testAdding() { + result=`add_generic 1 2` + assertEquals \ + "the result of '${result}' was wrong" \ + 3 "${result}" + + # Disable non-generic tests. + [ -z "${BASH_VERSION:-}" ] && startSkipping + + result=`add_bash 1 2` + assertEquals \ + "the result of '${result}' was wrong" \ + 3 "${result}" +} + +oneTimeSetUp() { + # Load include to test. + . ./math.inc +} + +# Load and run shUnit2. +. ../shunit2 |