summaryrefslogtreecommitdiff
path: root/tests/rm/r-2
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-02-26 21:34:41 +0000
committerJim Meyering <jim@meyering.net>2000-02-26 21:34:41 +0000
commitb0952dd04524683189cb49066c6daa938353b656 (patch)
tree2851cd8a8a73a394ccb53a743e2bcae72b4e3861 /tests/rm/r-2
parent20552b01beab0485184ff6f8f6e4b39e47e9cd57 (diff)
downloadcoreutils-b0952dd04524683189cb49066c6daa938353b656.tar.xz
Don't make the success of the test depend on the
order in which directory entries are processed. Reported by Andreas Schwab.
Diffstat (limited to 'tests/rm/r-2')
-rwxr-xr-xtests/rm/r-26
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/rm/r-2 b/tests/rm/r-2
index 2334f19d0..cd4a3abd0 100755
--- a/tests/rm/r-2
+++ b/tests/rm/r-2
@@ -17,7 +17,7 @@ mkdir $tmp $tmp/a $tmp/a/b
> $tmp/a/b/g
# FIXME: if this fails, it's a framework failure
-cat <<EOF > $tmp/$test.E
+cat <<EOF | sort > $tmp/$test.E
removing all entries of directory $tmp/a
removing all entries of directory $tmp/a/b
removing $tmp/a/b/g
@@ -31,8 +31,10 @@ export LANGUAGE
LANG=C
export LANG
+# Note that both the expected output (above) and the actual output lines
+# are sorted, because directory entries may be processed in arbitrary order.
fail=0
-$RM --verbose -r $tmp/a > $tmp/$test.O || fail=1
+$RM --verbose -r $tmp/a | sort > $tmp/$test.O || fail=1
if test -d $tmp/a; then
fail=1