Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add a test for PR bin/41880.
details: https://anonhg.NetBSD.org/src/rev/a7d4a705adee
branches: trunk
changeset: 764760:a7d4a705adee
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue May 03 08:36:15 2011 +0000
description:
Add a test for PR bin/41880.
diffstat:
distrib/sets/lists/tests/mi | 19 ++++++++++------
etc/mtree/NetBSD.dist.tests | 3 +-
tests/usr.bin/Makefile | 4 +-
tests/usr.bin/pr/Makefile | 9 +++++++
tests/usr.bin/pr/d_basic.in | 2 +
tests/usr.bin/pr/d_basic.out | 1 +
tests/usr.bin/pr/t_basic.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 78 insertions(+), 10 deletions(-)
diffs (148 lines):
diff -r f6831e6ae0f4 -r a7d4a705adee distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Tue May 03 08:18:43 2011 +0000
+++ b/distrib/sets/lists/tests/mi Tue May 03 08:36:15 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.324 2011/05/03 07:56:42 jruoho Exp $
+# $NetBSD: mi,v 1.325 2011/05/03 08:36:15 jruoho Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -2304,16 +2304,21 @@
./usr/tests/syscall/t_setuid tests-syscall-tests atf
./usr/tests/syscall/t_timer tests-syscall-tests atf
./usr/tests/syscall/t_umask tests-syscall-tests atf
-./usr/tests/toolchain tests-syscall-tests atf
-./usr/tests/toolchain/Atffile tests-syscall-tests atf
-./usr/tests/toolchain/cc tests-syscall-tests atf
-./usr/tests/toolchain/cc/Atffile tests-syscall-tests atf
-./usr/tests/toolchain/cc/t_hello tests-syscall-tests atf
+./usr/tests/toolchain tests-syscall-tests atf
+./usr/tests/toolchain/Atffile tests-syscall-tests atf
+./usr/tests/toolchain/cc tests-syscall-tests atf
+./usr/tests/toolchain/cc/Atffile tests-syscall-tests atf
+./usr/tests/toolchain/cc/t_hello tests-syscall-tests atf
./usr/tests/usr.bin tests-util-tests
./usr/tests/usr.bin/Atffile tests-sbin-tests atf
+./usr/tests/usr.bin/pr tests-util-tests
+./usr/tests/usr.bin/pr/Atffile tests-util-tests atf
+./usr/tests/usr.bin/pr/d_basic.in tests-util-tests atf
+./usr/tests/usr.bin/pr/d_basic.out tests-util-tests atf
+./usr/tests/usr.bin/pr/t_basic tests-util-tests atf
./usr/tests/usr.bin/rump_server tests-util-tests
./usr/tests/usr.bin/rump_server/Atffile tests-util-tests atf
-./usr/tests/usr.bin/rump_server/t_disk tests-util-tests atf
+./usr/tests/usr.bin/rump_server/t_disk tests-util-tests atf
./usr/tests/usr.bin tests-util-tests
./usr/tests/usr.bin/shmif_dumpbus tests-util-tests
./usr/tests/usr.bin/shmif_dumpbus/Atffile tests-util-tests atf
diff -r f6831e6ae0f4 -r a7d4a705adee etc/mtree/NetBSD.dist.tests
--- a/etc/mtree/NetBSD.dist.tests Tue May 03 08:18:43 2011 +0000
+++ b/etc/mtree/NetBSD.dist.tests Tue May 03 08:36:15 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.dist.tests,v 1.44 2011/05/03 07:56:42 jruoho Exp $
+# $NetBSD: NetBSD.dist.tests,v 1.45 2011/05/03 08:36:15 jruoho Exp $
./usr/libdata/debug/usr/tests
./usr/libdata/debug/usr/tests/atf
@@ -238,6 +238,7 @@
./usr/tests/toolchain
./usr/tests/toolchain/cc
./usr/tests/usr.bin
+./usr/tests/usr.bin/pr
./usr/tests/usr.bin/rump_server
./usr/tests/usr.bin/shmif_dumpbus
./usr/tests/usr.bin/unifdef
diff -r f6831e6ae0f4 -r a7d4a705adee tests/usr.bin/Makefile
--- a/tests/usr.bin/Makefile Tue May 03 08:18:43 2011 +0000
+++ b/tests/usr.bin/Makefile Tue May 03 08:36:15 2011 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2011/05/03 07:23:19 jruoho Exp $
+# $NetBSD: Makefile,v 1.4 2011/05/03 08:36:15 jruoho Exp $
#
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/usr.bin
-TESTS_SUBDIRS+= rump_server shmif_dumpbus unifdef
+TESTS_SUBDIRS+= pr rump_server shmif_dumpbus unifdef
.include <bsd.test.mk>
diff -r f6831e6ae0f4 -r a7d4a705adee tests/usr.bin/pr/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/pr/Makefile Tue May 03 08:36:15 2011 +0000
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2011/05/03 08:36:15 jruoho Exp $
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/pr
+
+TESTS_SH= t_basic
+
+.include <bsd.test.mk>
diff -r f6831e6ae0f4 -r a7d4a705adee tests/usr.bin/pr/d_basic.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/pr/d_basic.in Tue May 03 08:36:15 2011 +0000
@@ -0,0 +1,2 @@
+123 456 789
+abc def ghi
diff -r f6831e6ae0f4 -r a7d4a705adee tests/usr.bin/pr/d_basic.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/pr/d_basic.out Tue May 03 08:36:15 2011 +0000
@@ -0,0 +1,1 @@
+123 456 789 abc def ghi
diff -r f6831e6ae0f4 -r a7d4a705adee tests/usr.bin/pr/t_basic.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/pr/t_basic.sh Tue May 03 08:36:15 2011 +0000
@@ -0,0 +1,50 @@
+#! /usr/bin/atf-sh
+#
+# $NetBSD: t_basic.sh,v 1.1 2011/05/03 08:36:15 jruoho Exp $
+#
+# Copyright (c) 2011 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Jukka Ruohonen.
+#
+# 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 basic
+nonexistent_head() {
+ atf_set "descr" "A basic test of pr(1)"
+}
+
+basic_body() {
+
+ atf_expect_fail "PR bin/41880"
+
+ # The output file was generated with "pr (GNU coreutils) 6.10".
+ #
+ atf_check -s ignore -o file:$(atf_get_srcdir)/d_basic.out \
+ -x "pr -t -2 $(atf_get_srcdir)/d_basic.in"
+}
+
+atf_init_test_cases() {
+ atf_add_test_case basic
+}
Home |
Main Index |
Thread Index |
Old Index