diff options
Diffstat (limited to 'src/fluent-bit/tests/lib/shunit2/examples/party_test.sh')
-rwxr-xr-x | src/fluent-bit/tests/lib/shunit2/examples/party_test.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fluent-bit/tests/lib/shunit2/examples/party_test.sh b/src/fluent-bit/tests/lib/shunit2/examples/party_test.sh new file mode 100755 index 000000000..41bd124f2 --- /dev/null +++ b/src/fluent-bit/tests/lib/shunit2/examples/party_test.sh @@ -0,0 +1,16 @@ +#! /bin/sh +# file: examples/party_test.sh +# +# This test is mostly for fun. Technically, it is a bad example of a unit test +# because of the temporal requirement, namely that the year be 1999. A better +# test would have been to pass in both a known-bad and known-good year into a +# function, and test for the expected result. + +testPartyLikeItIs1999() { + year=`date '+%Y'` + assertEquals "It's not 1999 :-(" \ + '1999' "${year}" +} + +# Load and run shUnit2. +. ../shunit2 |