X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-exclude1.sh;h=3d167ece2f528a666711e28458089aff76d28c2a;hb=0f5a4162a9a8361be7e1c63b8e438002bfdee945;hp=2fe72b9cebdad885795e186444be4ba64bd8e9f0;hpb=87c5f6fccee477f7e2c67ea4c95e51a3afd83a41;p=gnulib.git
diff --git a/tests/test-exclude1.sh b/tests/test-exclude1.sh
index 2fe72b9ce..3d167ece2 100755
--- a/tests/test-exclude1.sh
+++ b/tests/test-exclude1.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for exclude.
-# Copyright (C) 2009, 2010 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,19 +16,18 @@
# 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 literal matches
-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