Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/config Handle warning messages.



details:   https://anonhg.NetBSD.org/src/rev/31538c47d32a
branches:  trunk
changeset: 804011:31538c47d32a
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Thu Nov 20 09:02:00 2014 +0000

description:
Handle warning messages.

diffstat:

 tests/usr.bin/config/t_config.sh |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r 02d3444e4301 -r 31538c47d32a tests/usr.bin/config/t_config.sh
--- a/tests/usr.bin/config/t_config.sh  Thu Nov 20 07:07:13 2014 +0000
+++ b/tests/usr.bin/config/t_config.sh  Thu Nov 20 09:02:00 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_config.sh,v 1.5 2014/10/31 09:11:42 uebayasi Exp $
+# $NetBSD: t_config.sh,v 1.6 2014/11/20 09:02:00 uebayasi Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -48,7 +48,19 @@
 
        run_and_check_prep "${name}"
 
-       atf_check -o ignore \
+       atf_check -o ignore -s eq:0 \
+           config -s "${supportdir}" -b "compile/${name}" "${config}"
+}
+
+run_and_check_warn()
+{
+       local name="${1}"; shift
+
+       run_and_check_prep "${name}"
+
+       local stderr
+       eval stderr=\$${name}_stderr
+       atf_check -o ignore -e "${stderr}" -s eq:0 \
            config -s "${supportdir}" -b "compile/${name}" "${config}"
 }
 
@@ -121,7 +133,8 @@
 include "../d_min"
 no options UNDEFINED
 '
-test_case no_undefined_opt pass \
+no_undefined_opt_stderr='match:UNDEFINED'
+test_case no_undefined_opt warn \
     "Checks that config allows a negation for an undefined options"
 
 # Attribute selection



Home | Main Index | Thread Index | Old Index