diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-12 17:12:59 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-12 17:14:21 +0100 |
commit | 293ba0481af81e296d922434983ebb23e79518e3 (patch) | |
tree | 3255f15ffe009852d40db4b1283d034b504a068d /tests/test-exclude4.sh | |
parent | e500079a186434daeba99a1ea115690715fd56eb (diff) | |
download | gnulib-293ba0481af81e296d922434983ebb23e79518e3.tar.gz |
revamp the other test-exclude?.sh scripts to use init.sh, too
* tests/test-exclude1.sh: Use init.sh.
* tests/test-exclude2.sh: Likewise.
* tests/test-exclude3.sh: Likewise.
* tests/test-exclude4.sh: Likewise.
* tests/test-exclude5.sh: Likewise.
* tests/test-exclude6.sh: Likewise.
* tests/test-exclude7.sh: Likewise.
* tests/test-exclude8.sh: Likewise.
* modules/exclude-tests (Files): List init.sh.
Diffstat (limited to 'tests/test-exclude4.sh')
-rwxr-xr-x | tests/test-exclude4.sh | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/test-exclude4.sh b/tests/test-exclude4.sh index 99c4c9fec1..b3ecdae75f 100755 --- a/tests/test-exclude4.sh +++ b/tests/test-exclude4.sh @@ -16,25 +16,30 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -TMP=excltmp.$$ -LIST=flist.$$ -ERR=0 +. "${srcdir=.}/init.sh"; path_prepend_ . +fail=0 # Test wildcard matching -cat > $LIST <<EOT +cat > in <<EOT foo* bar Baz EOT -cat > $TMP <<EOT +cat > expected <<EOT foobar: 1 EOT -./test-exclude$EXEEXT -wildcards $LIST -- foobar | - tr -d '\015' | - diff -c $TMP - || ERR=1 +test-exclude -wildcards in -- foobar > 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 |