X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-exclude2.sh;h=e7c8c0d175cf3b43abfc52b22baa79d8268a6947;hb=2d91a71b4af88ffea2bf5cf9a18e2f803ecba537;hp=62228262df51c48bb91444397e0ad5b3ad7ebc38;hpb=23d025fefa14a3815f8b804725acfd5622d3a4ac;p=gnulib.git
diff --git a/tests/test-exclude2.sh b/tests/test-exclude2.sh
index 62228262d..e7c8c0d17 100755
--- a/tests/test-exclude2.sh
+++ b/tests/test-exclude2.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 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,11 +16,10 @@
# 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
-cat > $LIST < in < $TMP < expected < out || exit $?
-rm -f $TMP $LIST
-exit $ERR
+# 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
+
+compare expected out || fail=1
+
+Exit $fail