Improved the trailing comment.
[rsync/rsync.git] / testsuite / exclude.test
index 7d75012..798819a 100644 (file)
@@ -35,7 +35,6 @@ ln -s too "$fromdir/bar/down/to/foo/sym"
 
 # Setup our test exclude/include file.
 
-# XXX comments reflect up-coming fixed behavior!
 excl="$scratchdir/exclude-from"
 cat >"$excl" <<EOF
 # If the second line of these two lines does anything, it's a bug.
@@ -54,25 +53,24 @@ cat >"$excl" <<EOF
 EOF
 
 # Create the chk dir with what we expect to be excluded
+
 checkit "$RSYNC -avv \"$fromdir/\" \"$chkdir/\"" "$fromdir" "$chkdir"
 
-# Ensure that the following removes will tweak the directory times.
-sleep 1
+sleep 1 # Ensures that the rm commands will tweak the directory times.
 
-# XXX Note modified to work with current broken behavior (to be fixed soon!)
 rm -r "$chkdir"/foo/down
-#rm -r "$chkdir"/mid/for/foo/and
+rm -r "$chkdir"/mid/for/foo/and
 rm "$chkdir"/foo/file[235-9]
-#rm "$chkdir"/bar/down/to/foo/to "$chkdir"/bar/down/to/foo/file[235-9]
-rm -r "$chkdir"/bar # XXX
+rm "$chkdir"/bar/down/to/foo/to "$chkdir"/bar/down/to/foo/file[235-9]
 rm "$chkdir"/mid/for/foo/extra
 
-# Make sure that the tweaked dirs times migrate back but nothing else.
-$RSYNC -av --include='*/' --exclude='*' "$chkdir/" "$fromdir/"
+# Un-tweak the directory times in our first (weak) exclude test (though
+# it's a good test of the --existing option).
+$RSYNC -av --existing --include='*/' --exclude='*' "$fromdir/" "$chkdir/"
 
-# Now, test if rsync excludes the same files
+# Now, test if rsync excludes the same files.
 
 checkit "$RSYNC -avv --exclude-from=$excl \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
 
+# The script would have aborted on error, so getting here means we've won.
 exit 0
-# last [] may have failed but if we get here then we've won