~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to gnulib-tests/test-exclude4.sh

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Test suite for exclude.
3
 
# Copyright (C) 2009-2011 Free Software Foundation, Inc.
 
3
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
4
4
# This file is part of the GNUlib Library.
5
5
#
6
6
# This program is free software: you can redistribute it and/or modify
16
16
# You should have received a copy of the GNU General Public License
17
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
18
 
19
 
TMP=excltmp.$$
20
 
LIST=flist.$$
21
 
ERR=0
 
19
. "${srcdir=.}/init.sh"; path_prepend_ .
 
20
fail=0
22
21
 
23
22
# Test wildcard matching
24
23
 
25
 
cat > $LIST <<EOT
 
24
cat > in <<EOT
26
25
foo*
27
26
bar
28
27
Baz
29
28
EOT
30
29
 
31
 
cat > $TMP <<EOT
 
30
cat > expected <<EOT
32
31
foobar: 1
33
32
EOT
34
33
 
35
 
./test-exclude$EXEEXT -wildcards $LIST -- foobar |
36
 
 tr -d '\015' |
37
 
 diff -c $TMP - || ERR=1
38
 
 
39
 
rm -f $TMP $LIST
40
 
exit $ERR
 
34
test-exclude -wildcards in -- foobar > out || exit $?
 
35
 
 
36
# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 
37
# does not understand '\r'.
 
38
case $(echo r | tr -d '\r') in '') cr='\015';; *) cr='\r';; esac
 
39
 
 
40
# normalize output
 
41
LC_ALL=C tr -d "$cr" < out > k && mv k out
 
42
 
 
43
compare expected out || fail=1
 
44
 
 
45
Exit $fail