X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=tests%2Fexclude06.at;fp=tests%2Fexclude06.at;h=b1c0da7f88a52d6c1b78eeb6c1ea7613fde247c8;hp=0000000000000000000000000000000000000000;hb=b414e25de8ca49d7567a92c203d431383ec57c83;hpb=29ece34f44a27750bbfd76154ad9882580453dc7 diff --git a/tests/exclude06.at b/tests/exclude06.at new file mode 100644 index 0000000..b1c0da7 --- /dev/null +++ b/tests/exclude06.at @@ -0,0 +1,47 @@ +# Process this file with autom4te to create testsuite. -*- Autotest -*- +# Copyright (C) 2010 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, see . + +# Tar 1.23 would fail to exclude names longer that 100 characters from +# pax format archives. +# +# Reported-by: Matthew Peterson +# References: +# http://lists.gnu.org/archive/html/help-tar/2010-06/msg00000.html + +AT_SETUP([exclude: long files in pax archives]) +AT_KEYWORDS([exclude exclude06]) + +m4_define([test_base_dir],[one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen]) + +AT_TAR_CHECK([ +AT_TAR_MKHIER(test_base_dir) +genfile --length 20 -f test_base_dir[/1.txt] +genfile --length 20 -f test_base_dir[/1.c] + +tar cf archive.tar test_base_dir +mkdir out +tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp +find out -type f +], +[0], +[[out/]test_base_dir[/1.c] +], +[], +[], +[], +[pax]) + +AT_CLEANUP