]> Dogcows Code - chaz/tar/blobdiff - tests/remfiles04b.at
Provide comprehensive testcases for various file removal modes.
[chaz/tar] / tests / remfiles04b.at
similarity index 63%
rename from tests/remfiles05.at
rename to tests/remfiles04b.at
index 04425a7d064cb2c7298f0cb683ef64233243ce1f..32085573032835002a37f737fe6ad495d519f48b 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Description: Tar 1.26 would remove wrong files when invoked with
-# --listed-incremental and -C
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of a single relative-path -C option,
+# in --create/incremental mode.
+#
+# (Tar 1.26 would remove files in original working directory when called in
+# this manner.  [It would follow the -C for archiving the files, but ignore it
+# for removing them afterwards.]
+#
 # Reported by: Nathan Stratton Treadway <nathanst@ontko.com>
 # References: <20130921171234.GG32256@shire.ontko.com>,
 #             http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00028.html
+# )
 
-AT_SETUP([incremental and -C])
-AT_KEYWORDS([incremental create remove-files remfiles05])
+AT_SETUP([remove-files with -C:rel in -c/incr. mode])
+AT_KEYWORDS([create incremental remove-files remfiles04 remfiles04b])
 
 AT_TAR_CHECK([
 AT_SORT_PREREQ
 mkdir foo
 echo bar > bar
-echo foo/bar > foo/bar
-decho A
-find . | sort
-
-decho B
-tar -cvf foo.tar --listed-incremental=foo.snar --remove-files -C foo bar
-decho C
+echo foobar > foo/bar
+tar -cf foo.tar --incremental --remove-files -C foo bar
+echo A
 find . | sort
 ],
 [0],
@@ -42,19 +47,7 @@ find . | sort
 .
 ./bar
 ./foo
-./foo/bar
-B
-bar
-C
-.
-./bar
-./foo
-./foo.snar
 ./foo.tar
-],
-[A
-B
-C
-],[],[],[gnu])
+],[],[],[],[gnu])
 
 AT_CLEANUP
This page took 0.018763 seconds and 4 git commands to generate.