summaryrefslogtreecommitdiffstats
path: root/unit/atf-src/bootstrap/t_subr_atf_check.at
diff options
context:
space:
mode:
Diffstat (limited to 'unit/atf-src/bootstrap/t_subr_atf_check.at')
-rw-r--r--unit/atf-src/bootstrap/t_subr_atf_check.at77
1 files changed, 77 insertions, 0 deletions
diff --git a/unit/atf-src/bootstrap/t_subr_atf_check.at b/unit/atf-src/bootstrap/t_subr_atf_check.at
new file mode 100644
index 0000000..4aca4e4
--- /dev/null
+++ b/unit/atf-src/bootstrap/t_subr_atf_check.at
@@ -0,0 +1,77 @@
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
+dnl All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions
+dnl are met:
+dnl 1. Redistributions of source code must retain the above copyright
+dnl notice, this list of conditions and the following disclaimer.
+dnl 2. Redistributions in binary form must reproduce the above copyright
+dnl notice, this list of conditions and the following disclaimer in the
+dnl documentation and/or other materials provided with the distribution.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
+dnl CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+dnl IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
+dnl DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+dnl GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+AT_SETUP([subr: atf_check function])
+
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) exitcode_0_0],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) exitcode_0_1],
+ [1], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) exitcode_1_0],
+ [1], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) exitcode_1_1],
+ [0], [ignore], [ignore])
+
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_expout_pass],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_expout_fail],
+ [1], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_ignore_empty],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_ignore_sth],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_null_empty],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_null_sth],
+ [1], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_stdout_written],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_match_ok],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_match_fail],
+ [1], [ignore], [ignore])
+
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_experr_pass],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_experr_fail],
+ [1], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_ignore_empty],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_ignore_sth],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_null_empty],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_null_sth],
+ [1], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_stderr_written],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_match_ok],
+ [0], [ignore], [ignore])
+AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_match_fail],
+ [1], [ignore], [ignore])
+
+AT_CLEANUP()
+
+dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4