summaryrefslogtreecommitdiff
path: root/tests/du
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-01-05 07:53:11 +0000
committerJim Meyering <jim@meyering.net>2005-01-05 07:53:11 +0000
commit78652e53f51c72e09309a811fd206dc757b94490 (patch)
tree2a8b7e5b44adff66eab490d28828d6617f60b316 /tests/du
parentabbddbe414a5ce45dc5e2ad2ccea6cccbb660154 (diff)
downloadcoreutils-78652e53f51c72e09309a811fd206dc757b94490.tar.xz
Add a test for today's fix:
(process_file): Evaluate exclusion rules against the entire file name, not just the last component.
Diffstat (limited to 'tests/du')
-rwxr-xr-xtests/du/exclude9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/du/exclude b/tests/du/exclude
index 41f7ecd56..de24ba19b 100755
--- a/tests/du/exclude
+++ b/tests/du/exclude
@@ -32,6 +32,11 @@ du --exclude-from=excl a | sed 's/^[0-9][0-9]* //' | sort >> out || fail=1
printf '===\n' >> out
# Make sure that we can exclude an entire hierarchy.
du --exclude=a a >> out || fail=1
+# Make sure that we can exclude based on more than one component.
+# Before coreutils-5.3.0, this part would fail.
+printf '===\n' >> out
+du --exclude=a/u --exclude=a/b a \
+ | sed 's/^[0-9][0-9]* //' | sort >> out || fail=1
cat <<\EOF > exp
a
a/b
@@ -45,6 +50,10 @@ a/u/v
a/x
a/x/y
===
+===
+a
+a/x
+a/x/y
EOF
cmp out exp || fail=1