]> Dogcows Code - chaz/tar/blobdiff - tests/remfiles05c.at
Provide comprehensive testcases for various file removal modes.
[chaz/tar] / tests / remfiles05c.at
similarity index 65%
rename from tests/remfiles06.at
rename to tests/remfiles05c.at
index 3c3dbf4e11b44f50fc98f0c42d16237a35806bab..a01b0920237f9613ac60c0b9ef4ab109848e83f8 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: There was a leftover call to chdir in name_next_elt() in
-# tar 1.26.  After commit e3d28d84 this call would confuse the tar_getcwd
-# function.
-# Reported by: Nathan Stratton Treadway <nathanst@ontko.com>
-# References: <20130924145657.GM32256@shire.ontko.com>,
-#             http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00045.html
+# Description: ensure tar correctly respects -C option when deleting
+# files due to the --remove-files option.
+#
+# This case checks the use of two relative-path -C options,
+# in --append mode.
+#
 
-AT_SETUP([remove with two -C])
-AT_KEYWORDS([remove-files remfiles06])
+AT_SETUP([remove-files with -C:rel,rel in -r mode])
+AT_KEYWORDS([create append remove-files remfiles05 remfiles05c])
 
 AT_TAR_CHECK([
 AT_SORT_PREREQ
-mkdir tartest
-cd tartest
 mkdir foo
-echo foo/file > foo/file
 mkdir bar
+echo file > file
+echo foo/file > foo/file
 echo bar/file > bar/file
+tar -cf foo.tar -C foo file -C ../bar file
 decho A
-find|sort
-
+find . | sort
 decho B
-tar -cvf ../foo.tar --remove-files -C foo file -C ../bar file
-
+tar -rvf foo.tar --remove-files -C foo file -C ../bar file
 decho C
-find|sort
+find . | sort
 ],
 [0],
 [A
 .
 ./bar
 ./bar/file
+./file
 ./foo
+./foo.tar
 ./foo/file
 B
 file
@@ -55,7 +55,9 @@ file
 C
 .
 ./bar
+./file
 ./foo
+./foo.tar
 ],
 [A
 B
This page took 0.01934 seconds and 4 git commands to generate.