X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-exclude7.sh;h=cb1e0cb73f96c8aa684052e87770c0daf37e2e43;hb=c9451e3bdc651a742f06b46a450497e59bb5e006;hp=95dc9fbc321a2ffe338783b121640e939c77c9a5;hpb=f28a2482feb7b5870dea9c7fb895622cdca5bd30;p=gnulib.git diff --git a/tests/test-exclude7.sh b/tests/test-exclude7.sh index 95dc9fbc3..cb1e0cb73 100755 --- a/tests/test-exclude7.sh +++ b/tests/test-exclude7.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -16,27 +16,32 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -TMP=excltmp.$$ -LIST=flist.$$ -ERR=0 +. "${srcdir=.}/init.sh"; path_prepend_ . +fail=0 # Test exclude precedence -cat > $LIST < in < $TMP < expected <$TMP.1 -./test-exclude$EXEEXT -include $LIST -no-include $LIST -- bar >>$TMP.1 +test-exclude in -include in -- bar > out || exit $? +test-exclude -include in -no-include in -- bar >> out || exit $? + +# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr +# does not understand '\r'. +case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac + +# normalize output +LC_ALL=C tr -d "$cr" < out > k && mv k out -diff -c $TMP $TMP.1 || ERR=1 +compare expected out || fail=1 -rm -f $TMP $TMP.1 $LIST -exit $ERR +Exit $fail