t_basic.sh revision 1.3
11.1Sjruoho#! /usr/bin/atf-sh
21.1Sjruoho#
31.3Snjoly# $NetBSD: t_basic.sh,v 1.3 2011/05/10 19:02:27 njoly Exp $
41.1Sjruoho#
51.1Sjruoho# Copyright (c) 2011 The NetBSD Foundation, Inc.
61.1Sjruoho# All rights reserved.
71.1Sjruoho#
81.1Sjruoho# This code is derived from software contributed to The NetBSD Foundation
91.1Sjruoho# by Jukka Ruohonen.
101.1Sjruoho#
111.1Sjruoho# Redistribution and use in source and binary forms, with or without
121.1Sjruoho# modification, are permitted provided that the following conditions
131.1Sjruoho# are met:
141.1Sjruoho# 1. Redistributions of source code must retain the above copyright
151.1Sjruoho#    notice, this list of conditions and the following disclaimer.
161.1Sjruoho# 2. Redistributions in binary form must reproduce the above copyright
171.1Sjruoho#    notice, this list of conditions and the following disclaimer in the
181.1Sjruoho#    documentation and/or other materials provided with the distribution.
191.1Sjruoho#
201.1Sjruoho# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
211.1Sjruoho# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
221.1Sjruoho# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
231.1Sjruoho# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
241.1Sjruoho# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
251.1Sjruoho# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
261.1Sjruoho# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
271.1Sjruoho# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
281.1Sjruoho# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
291.1Sjruoho# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
301.1Sjruoho# POSSIBILITY OF SUCH DAMAGE.
311.1Sjruoho#
321.1Sjruoho
331.1Sjruohoatf_test_case basic
341.2Sjruohobasic_head() {
351.1Sjruoho	atf_set "descr" "A basic test of unifdef(1)"
361.3Snjoly	atf_set "require.progs" "unifdef"
371.1Sjruoho}
381.1Sjruoho
391.1Sjruohobasic_body() {
401.1Sjruoho
411.1Sjruoho	# See PR bin/42628.
421.1Sjruoho	#
431.1Sjruoho	atf_check -s ignore -o file:$(atf_get_srcdir)/d_basic.out \
441.1Sjruoho		-x "unifdef -U__FreeBSD__ $(atf_get_srcdir)/d_basic.in"
451.1Sjruoho}
461.1Sjruoho
471.1Sjruohoatf_init_test_cases() {
481.1Sjruoho	atf_add_test_case basic
491.1Sjruoho}
50