# 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: See remfiles06.at
-# Reported by: Nathan Stratton Treadway <nathanst@ontko.com>
-# References: <20130924185129.GO32256@shire.ontko.com>
+# Description: check --remove-files operation when archiving/deleting
+# directory trees.
+#
+# This case checks the operation
+# in --append mode.
+#
-AT_SETUP([remove with -C to absolute path])
-AT_KEYWORDS([create remove-files remfiles07])
+AT_SETUP([remove-files on full directory in -r mode])
+AT_KEYWORDS([create append remove-files remfiles09 remfiles09c])
AT_TAR_CHECK([
AT_SORT_PREREQ
-mkdir tartest
-cd tartest
mkdir foo
echo foo/file > foo/file
-mkdir bar
-echo bar/file > bar/file
+tar -cf foo.tar foo
decho A
-find|sort
-
-DIR=`pwd`
+find . | sort
decho B
-tar -cvf ../foo.tar --remove-files -C foo file -C $DIR/bar file
-
+tar -rvf foo.tar --remove-files foo
decho C
-find|sort
+find . | sort
],
[0],
[A
.
-./bar
-./bar/file
./foo
+./foo.tar
./foo/file
B
-file
-file
+foo/
+foo/file
C
.
-./bar
-./foo
+./foo.tar
],
[A
B