Module Name:    src
Committed By:   uebayasi
Date:           Thu Nov 20 09:02:00 UTC 2014

Modified Files:
        src/tests/usr.bin/config: t_config.sh

Log Message:
Handle warning messages.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/config/t_config.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/config/t_config.sh
diff -u src/tests/usr.bin/config/t_config.sh:1.5 src/tests/usr.bin/config/t_config.sh:1.6
--- src/tests/usr.bin/config/t_config.sh:1.5	Fri Oct 31 09:11:42 2014
+++ src/tests/usr.bin/config/t_config.sh	Thu Nov 20 09:02:00 2014
@@ -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_pass()
 
 	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 @@ no_undefined_opt_config_str='
 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

Reply via email to