>From 3bfe5f52f469ab8ea1ae5fb6a2974955d33c8705 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 15 Aug 2012 16:55:27 +0200 Subject: [PATCH 1/3] Test for bad cooperation of --wildcard and --update options. --- tests/Makefile.am | 1 + tests/testsuite.at | 1 + tests/update03.at | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 tests/update03.at diff --git a/tests/Makefile.am b/tests/Makefile.am index 4601e0e..b20b86e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -160,6 +160,7 @@ TESTSUITE_AT = \ update.at\ update01.at\ update02.at\ + update03.at\ volsize.at\ volume.at\ verbose.at\ diff --git a/tests/testsuite.at b/tests/testsuite.at index 97f5e41..c7585e9 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -245,6 +245,7 @@ m4_include([spmvp10.at]) m4_include([update.at]) m4_include([update01.at]) m4_include([update02.at]) +m4_include([update03.at]) m4_include([verify.at]) diff --git a/tests/update03.at b/tests/update03.at new file mode 100644 index 0000000..511dabb --- /dev/null +++ b/tests/update03.at @@ -0,0 +1,43 @@ +# Process this file with autom4te to create testsuite. -*- Autotest -*- + +# Test suite for GNU tar. +# Copyright (C) 2012 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# Description: Test for bad wildcard-matching while updating an archive. + +AT_SETUP([update non-changed files with --wildcards]) +AT_KEYWORDS([update update03]) + +AT_TAR_CHECK([ +AT_SORT_PREREQ +mkdir zzz +touch zzz/foo@<:@bar@:>@ + +tar -cvf archive.tar --wildcards zzz +echo "separator" + +# this should print nothing +tar -uvf archive.tar --wildcards zzz +], +[0], +[zzz/ +zzz/foo@<:@bar@:>@ +separator] +) + +AT_CLEANUP -- 1.7.11.2