]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Add a test for today's fix:
authorJim Meyering <jim@meyering.net>
Wed, 5 Jan 2005 07:53:11 +0000 (07:53 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 5 Jan 2005 07:53:11 +0000 (07:53 +0000)
  (process_file): Evaluate exclusion rules against
  the entire file name, not just the last component.

tests/du/exclude

index 41f7ecd56a5484ec92c74da00c6a14d4291b4a09..de24ba19b42457555dcdeef7d11c60e7e8b0a32f 100755 (executable)
@@ -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