Module Name: src
Committed By: christos
Date: Mon Feb 22 19:52:03 UTC 2016
Modified Files:
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_redir.sh
Log Message:
Add new test
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_redir.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/Makefile
diff -u src/tests/bin/sh/Makefile:1.4 src/tests/bin/sh/Makefile:1.5
--- src/tests/bin/sh/Makefile:1.4 Thu Sep 11 14:25:30 2014
+++ src/tests/bin/sh/Makefile Mon Feb 22 14:52:03 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2014/09/11 18:25:30 dholland Exp $
+# $NetBSD: Makefile,v 1.5 2016/02/22 19:52:03 christos Exp $
#
.include <bsd.own.mk>
@@ -13,6 +13,7 @@ TESTS_SH+= t_expand
TESTS_SH+= t_evaltested
TESTS_SH+= t_fsplit
TESTS_SH+= t_here
+TESTS_SH+= t_redir
TESTS_SH+= t_set_e
TESTS_SH+= t_ulimit
TESTS_SH+= t_varquote
Added files:
Index: src/tests/bin/sh/t_redir.sh
diff -u /dev/null src/tests/bin/sh/t_redir.sh:1.1
--- /dev/null Mon Feb 22 14:52:03 2016
+++ src/tests/bin/sh/t_redir.sh Mon Feb 22 14:52:03 2016
@@ -0,0 +1,40 @@
+# $NetBSD: t_redir.sh,v 1.1 2016/02/22 19:52:03 christos Exp $
+#
+# Copyright (c) 2016 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+atf_test_case redir_in_case
+redir_in_case_head() {
+ atf_set "descr" "Tests that sh(1) allows plain redirections " \
+ "in case statements. (PR bin/48631)"
+}
+redir_in_case_body() {
+ atf_check -s exit:0 -o ignore -e ignore \
+ -x '/bin/sh -c "case x in (whatever) >foo;; esac"'
+}
+
+atf_init_test_cases() {
+ atf_add_test_case redir_in_case
+}