summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-09-04 07:25:10 +0000
committerJim Meyering <jim@meyering.net>2000-09-04 07:25:10 +0000
commite2017655a101934a9443454f23799ece8e57058f (patch)
tree58783b68f3d1ae18f7b45b6a73c0b2b2a4cdb35a /tests
parent09af7ed5f79b14113d7955f76422d754c58b6975 (diff)
downloadcoreutils-e2017655a101934a9443454f23799ece8e57058f.tar.xz
*** empty log message ***
Diffstat (limited to 'tests')
-rwxr-xr-xtests/mv/part-symlink14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index 49fe6c60a..a21fa8125 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -13,6 +13,8 @@ tmp=part-sl.$$
trap 'status=$?; cd $pwd; rm -rf $tmp $other_partition_tmpdir && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
+pwd_tmp=$pwd/$tmp
+
. $srcdir/setup
. $srcdir/../envvar-check
@@ -64,6 +66,7 @@ for copy in cp mv; do
'rem_reg loc_sl' \
; do
for options in '' --rem; do
+ test "$options" = --rem && test $copy = mv && continue
rm -rf dir || fail=1
rm -f $other_partition_tmpdir/rem_reg || fail=1
rm -f $other_partition_tmpdir/rem_sl || fail=1
@@ -89,15 +92,24 @@ for copy in cp mv; do
# Normalize the program name in the error output,
# and put brackets around the output.
test -s .err &&
- echo "[`sed 's/^[^:][^:]*\(..\):/\1:/;s,$other_partition_tmpdir/,,' .err`]"
+ cp --backup .err /tmp
+ test -s .err && {
+ echo '[' | tr -d '\012'
+ sed 's/^[^:][^:]*\(..\):/\1:/;s,'$other_partition_tmpdir/,, .err
+ echo ']' | tr -d '\012'
+ }
# Strip off all but the file names.
ls="`ls -lG --ignore=.err . \
| sed \
-e '/^total /d' \
+ -e s,$other_partition_tmpdir/,, \
+ -e s,$pwd_tmp/,, \
-e 's/^...............................................//'`"
ls2="`cd $other_partition_tmpdir && ls -lG --ignore=.err . \
| sed \
-e '/^total /d' \
+ -e s,$other_partition_tmpdir/,, \
+ -e s,$pwd_tmp/,, \
-e 's/^...............................................//'`"
echo "($ls) ($ls2)"