summaryrefslogtreecommitdiff
path: root/tests/du/hard-link
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-14 06:50:28 +0000
committerJim Meyering <jim@meyering.net>2003-03-14 06:50:28 +0000
commit4f6b47eb0b0ea76c53f94409bc34eafa596d3706 (patch)
tree6dd2135e507abdc534645c48bffbc8a1fe255c08 /tests/du/hard-link
parent37fce4800eb2ba82e2bd5fc240cd6b869510d7fd (diff)
downloadcoreutils-4f6b47eb0b0ea76c53f94409bc34eafa596d3706.tar.xz
sort du output, in case f1 and f2 are listed in a different order
Diffstat (limited to 'tests/du/hard-link')
-rwxr-xr-xtests/du/hard-link6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/du/hard-link b/tests/du/hard-link
index 6e0eaade9..5de5d81da 100755
--- a/tests/du/hard-link
+++ b/tests/du/hard-link
@@ -34,17 +34,17 @@ du -a --exclude=sub dir \
| sed 's/^[0-9][0-9]* //' > out || fail=1
echo === >> out
du -a --exclude=sub --count-links dir \
- | sed 's/^[0-9][0-9]* //' >> out || fail=1
+ | sed 's/^[0-9][0-9]* //' | sort -r >> out || fail=1
cat <<\EOF > exp
dir/f1
dir
===
-dir/f1
dir/f2
+dir/f1
dir
EOF
cmp out exp || fail=1
-test $fail = 1 && diff out exp 2> /dev/null
+test $fail = 1 && diff -u out exp 2> /dev/null
(exit $fail); exit $fail