1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
# This test demonstrates some test skipping logic that
# one can implement with bash_unit
todo_will_always_be_skipped() {
fail "This test is always skipped"
}
skip_if "uname | grep Darwin" linux
skip_if "uname | grep Linux" darwin
test_linux_proc_exists() {
assert "ls /proc/" "there should exist /proc on Linux"
}
test_another_test_to_run_only_on_linux() {
assert "mkdir /tmp/foo/bar -p"
}
test_that_always_run() {
assert true
}
test_darwin_proc_does_not_exist() {
assert_fail "ls /proc/" "there should not exist /proc on Darwin"
}
test_another_test_to_run_only_on_darwin() {
assert "mkdir -p /tmp/foo/bar"
}
|