summaryrefslogtreecommitdiff
path: root/tests/mv/part-symlink
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-09-04 07:09:08 +0000
committerJim Meyering <jim@meyering.net>2000-09-04 07:09:08 +0000
commit09af7ed5f79b14113d7955f76422d754c58b6975 (patch)
treeaccc323ef80de2db8de3539c8f9697469db67c64 /tests/mv/part-symlink
parent2c663e070c4ed79a471ef700056cbea22a3d9458 (diff)
downloadcoreutils-09af7ed5f79b14113d7955f76422d754c58b6975.tar.xz
*** empty log message ***
Diffstat (limited to 'tests/mv/part-symlink')
-rwxr-xr-xtests/mv/part-symlink28
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index 8685b0c53..49fe6c60a 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -51,6 +51,11 @@ exec 1> $actual
# FIXME: This should be bigger: like more than 8k
contents=XYZ
+loc_reg=loc_reg
+loc_sl=loc_sl
+rem_reg=$other_partition_tmpdir/rem_reg
+rem_sl=$other_partition_tmpdir/rem_sl
+
for copy in cp mv; do
for args in \
'loc_reg rem_sl' \
@@ -59,22 +64,20 @@ for copy in cp mv; do
'rem_reg loc_sl' \
; do
for options in '' --rem; do
- rm -rf dir $other_partition_tmpdir/reg || fail=1
- rm -f $other_partition_tmpdir/reg || fail=1
+ rm -rf dir || fail=1
+ rm -f $other_partition_tmpdir/rem_reg || fail=1
rm -f $other_partition_tmpdir/rem_sl || fail=1
mkdir dir || fail=1
cd dir || fail=1
- case "$args" in *loc_reg*) reg=reg; reg_abs="`pwd`/$reg" ;; esac
- case "$args" in *rem_reg*) reg=$other_partition_tmpdir/reg
- reg_abs=$reg ;; esac
- case "$args" in *loc_sl*) slink=slink ;; esac
- case "$args" in *rem_sl*) slink=$other_partition_tmpdir/slink ;; esac
+ case "$args" in *loc_reg*) reg_abs="`pwd`/$loc_reg" ;; esac
+ case "$args" in *rem_reg*) reg_abs=$rem_reg ;; esac
+ case "$args" in *loc_sl*) slink=$loc_sl ;; esac
+ case "$args" in *rem_sl*) slink=$rem_sl ;; esac
- echo $contents > $reg || fail=1
+ echo $contents > $reg_abs || fail=1
ln -nsf $reg_abs $slink || fail=1
- actual_args=$args
- actual_args=`echo $actual_args|sed "s,..._reg,$reg,"`
- actual_args=`echo $actual_args|sed "s,..._sl,$slink,"`
+ actual_args=`echo $args|sed 's,^,$,;s/ / $/'`
+ actual_args=`eval echo $actual_args`
(
(
@@ -85,7 +88,8 @@ 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:/' .err`]"
+ test -s .err &&
+ echo "[`sed 's/^[^:][^:]*\(..\):/\1:/;s,$other_partition_tmpdir/,,' .err`]"
# Strip off all but the file names.
ls="`ls -lG --ignore=.err . \
| sed \