X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Ftar;a=blobdiff_plain;f=tests%2Fremfiles04b.at;fp=tests%2Fremfiles05.at;h=32085573032835002a37f737fe6ad495d519f48b;hp=04425a7d064cb2c7298f0cb683ef64233243ce1f;hb=3125d311e17c91da85de3bca326cf485523d78a0;hpb=74ce228f6df956e6b7be9fd4f993bada4b7ea645 diff --git a/tests/remfiles05.at b/tests/remfiles04b.at similarity index 63% rename from tests/remfiles05.at rename to tests/remfiles04b.at index 04425a7..3208557 100644 --- a/tests/remfiles05.at +++ b/tests/remfiles04b.at @@ -15,26 +15,31 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# 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 # 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