mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
Ignore chatter about when files are removed,
since POSIX doesn't require rename to fail across file systems.
This commit is contained in:
1 parent
181e78b2d6
commit
b6820a451d
1 file changed
+6
-11
+6
-11
@@ -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
|
||||
|
||||
Reference in new issue
Block a user