Ignore chatter about when files are removed,
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Apr 2005 20:35:14 +0000 (20:35 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Apr 2005 20:35:14 +0000 (20:35 +0000)
since POSIX doesn't require rename to fail across file systems.

tests/mv/mv-special-1

index f7cf4032849644664a7824c4abf94cfd60d8bbb6..7c7d05c22b7b514fe033ef667414e679da4ce1dd 100755 (executable)
@@ -50,11 +50,15 @@ test -d $dir && fail=1
 ls $other_partition_tmpdir/$null > /dev/null || fail=1
 test -d $other_partition_tmpdir/$dir/a/b/c || fail=1
 
-sed "s,$other_partition_tmpdir,XXX," out | sort > out2
+# POSIX says rename (A, B) can succeed if A and B are on different file systems,
+# so ignore chatter about when files are removed and copied rather than renamed.
+sed "
+  /^removed /d
+  s,$other_partition_tmpdir,XXX,
+" out | sort > out2
 
 cat <<EOF | sort > exp
 \`$null' -> \`XXX/$null'
-removed \`$null'
 \`$dir' -> \`XXX/$dir'
 \`$dir/a' -> \`XXX/$dir/a'
 \`$dir/a/b' -> \`XXX/$dir/a/b'
@@ -64,15 +68,6 @@ removed \`$null'
 \`$dir/d/e' -> \`XXX/$dir/d/e'
 \`$dir/d/e/f' -> \`XXX/$dir/d/e/f'
 \`$dir/d/e/f/file2' -> \`XXX/$dir/d/e/f/file2'
-removed directory: \`$dir'
-removed \`$dir/a/b/c/file1'
-removed \`$dir/d/e/f/file2'
-removed directory: \`$dir/a'
-removed directory: \`$dir/a/b'
-removed directory: \`$dir/a/b/c'
-removed directory: \`$dir/d'
-removed directory: \`$dir/d/e'
-removed directory: \`$dir/d/e/f'
 EOF
 
 cmp out2 exp || fail=1