summaryrefslogtreecommitdiff
path: root/unit/atf-src/atf-sh/tc_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'unit/atf-src/atf-sh/tc_test.sh')
-rw-r--r--unit/atf-src/atf-sh/tc_test.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/unit/atf-src/atf-sh/tc_test.sh b/unit/atf-src/atf-sh/tc_test.sh
index 5a1698cf..5bece420 100644
--- a/unit/atf-src/atf-sh/tc_test.sh
+++ b/unit/atf-src/atf-sh/tc_test.sh
@@ -1,7 +1,7 @@
#
# Automated Testing Framework (atf)
#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -43,9 +43,22 @@ default_status_body()
atf_check -s eq:1 -o ignore -e match:'An error' ${h} tc_fail
}
+atf_test_case missing_body
+missing_body_head()
+{
+ atf_set "descr" "Verifies that test cases without a body are reported" \
+ "as failed"
+}
+missing_body_body()
+{
+ h="$(atf_get_srcdir)/misc_helpers -s $(atf_get_srcdir)"
+ atf_check -s eq:1 -o ignore -e ignore ${h} tc_missing_body
+}
+
atf_init_test_cases()
{
atf_add_test_case default_status
+ atf_add_test_case missing_body
}
# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4