Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/bin/sh Add new test
details: https://anonhg.NetBSD.org/src/rev/3dd125af2dfb
branches: trunk
changeset: 343714:3dd125af2dfb
user: christos <christos%NetBSD.org@localhost>
date: Mon Feb 22 19:52:03 2016 +0000
description:
Add new test
diffstat:
tests/bin/sh/Makefile | 3 ++-
tests/bin/sh/t_redir.sh | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 1 deletions(-)
diffs (61 lines):
diff -r 09ce546f02a7 -r 3dd125af2dfb tests/bin/sh/Makefile
--- a/tests/bin/sh/Makefile Mon Feb 22 19:42:46 2016 +0000
+++ b/tests/bin/sh/Makefile Mon Feb 22 19:52:03 2016 +0000
@@ -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_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
diff -r 09ce546f02a7 -r 3dd125af2dfb tests/bin/sh/t_redir.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/bin/sh/t_redir.sh Mon Feb 22 19:52:03 2016 +0000
@@ -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
+}
Home |
Main Index |
Thread Index |
Old Index