Module Name:    src
Committed By:   kre
Date:           Fri Jun  2 01:38:45 UTC 2017

Modified Files:
        src/tests/bin/sh: t_option.sh

Log Message:
Guard against EVN being set, and possibly referencing an unset
variable, when we are running tests with sh -u


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_option.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/bin/sh/t_option.sh
diff -u src/tests/bin/sh/t_option.sh:1.3 src/tests/bin/sh/t_option.sh:1.4
--- src/tests/bin/sh/t_option.sh:1.3	Tue Mar  8 14:19:28 2016
+++ src/tests/bin/sh/t_option.sh	Fri Jun  2 01:38:44 2017
@@ -1,4 +1,4 @@
-# $NetBSD: t_option.sh,v 1.3 2016/03/08 14:19:28 christos Exp $
+# $NetBSD: t_option.sh,v 1.4 2017/06/02 01:38:44 kre Exp $
 #
 # Copyright (c) 2016 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -356,6 +356,8 @@ set_u_head() {
 set_u_body() {
 	test_option_on_off u
 
+	unset ENV	# make sure there is nothing there to cause problems
+
 	# first make sure it is OK to unset an unset variable
 	atf_check -s exit:0 -o match:OK -e empty ${TEST_SH} -ce \
 		'unset _UNSET_VARIABLE_; echo OK'

Reply via email to