summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-03-22 21:29:30 +0100
committerJim Meyering <jim@meyering.net>2007-03-22 21:29:30 +0100
commit59e889f0f3e8cce31387e2e03ab9dfcf48b48955 (patch)
treec8f9e262394448e999f7200f213459439c96574a /tests
parent3440b65ecf8cca204a3fe37e1d97a8609de72ba3 (diff)
downloadcoreutils-59e889f0f3e8cce31387e2e03ab9dfcf48b48955.tar.xz
Improve a test script.
* tests/mv/hard-3: Check for 'ls' failure, too. Generate more-useful debugging output when 'ls' fails.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/mv/hard-312
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/mv/hard-3 b/tests/mv/hard-3
index 0ab9521fa..b912da34f 100755
--- a/tests/mv/hard-3
+++ b/tests/mv/hard-3
@@ -2,7 +2,7 @@
# Ensure that using `cp --preserve=link' to copy hard-linked arguments
# onto existing destinations works, even when one of the link operations fails.
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -78,12 +78,12 @@ test -f x/b || fail=1
test -f c || fail=1
# The i-node numbers of a and c must be the same.
-ia=`ls -i a|sed 's/ a$//'`
-ic=`ls -i c|sed 's/ c$//'`
-test $ia = $ic || fail=1
+ia=`ls -i a` || fail=1; set x $ia; ia=$3
+ic=`ls -i c` || fail=1; set x $ic; ic=$3
+test "$ia" = "$ic" || fail=1
# The i-node number of x/b must be different.
-ib=`ls -i x/b|sed 's/ x.b$//'`
-test $ia = $ib && fail=1
+ib=`ls -i x/b` || fail=1; set x $ib; ib=$3
+test "$ia" = "$ib" && fail=1
(exit $fail); exit $fail