xref: /netbsd/tests/usr.bin/pr/t_basic.sh (revision 7d193f58)
1*7d193f58Sjruoho# $NetBSD: t_basic.sh,v 1.4 2012/03/13 05:40:00 jruoho Exp $
2728d57f9Sjruoho#
3728d57f9Sjruoho# Copyright (c) 2011 The NetBSD Foundation, Inc.
4728d57f9Sjruoho# All rights reserved.
5728d57f9Sjruoho#
6728d57f9Sjruoho# This code is derived from software contributed to The NetBSD Foundation
7728d57f9Sjruoho# by Jukka Ruohonen.
8728d57f9Sjruoho#
9728d57f9Sjruoho# Redistribution and use in source and binary forms, with or without
10728d57f9Sjruoho# modification, are permitted provided that the following conditions
11728d57f9Sjruoho# are met:
12728d57f9Sjruoho# 1. Redistributions of source code must retain the above copyright
13728d57f9Sjruoho#    notice, this list of conditions and the following disclaimer.
14728d57f9Sjruoho# 2. Redistributions in binary form must reproduce the above copyright
15728d57f9Sjruoho#    notice, this list of conditions and the following disclaimer in the
16728d57f9Sjruoho#    documentation and/or other materials provided with the distribution.
17728d57f9Sjruoho#
18728d57f9Sjruoho# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19728d57f9Sjruoho# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20728d57f9Sjruoho# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21728d57f9Sjruoho# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22728d57f9Sjruoho# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23728d57f9Sjruoho# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24728d57f9Sjruoho# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25728d57f9Sjruoho# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26728d57f9Sjruoho# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27728d57f9Sjruoho# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28728d57f9Sjruoho# POSSIBILITY OF SUCH DAMAGE.
29728d57f9Sjruoho#
30728d57f9Sjruoho
31728d57f9Sjruohoatf_test_case basic
325045d9aaSjruohobasic_head() {
33*7d193f58Sjruoho	atf_set "descr" "A basic test of pr(1) (cf. PR bin/41880)"
34728d57f9Sjruoho}
35728d57f9Sjruoho
36728d57f9Sjruohobasic_body() {
37728d57f9Sjruoho
38728d57f9Sjruoho	# The output file was generated with "pr (GNU coreutils) 6.10".
39728d57f9Sjruoho	#
40728d57f9Sjruoho	atf_check -s ignore -o file:$(atf_get_srcdir)/d_basic.out \
41728d57f9Sjruoho		-x "pr -t -2 $(atf_get_srcdir)/d_basic.in"
42728d57f9Sjruoho}
43728d57f9Sjruoho
44728d57f9Sjruohoatf_init_test_cases() {
45728d57f9Sjruoho	atf_add_test_case basic
46728d57f9Sjruoho}
47