1# Process this file with autom4te to create testsuite. -*- Autotest -*- 2 3# Test suite for GNU tar. 4# Copyright (C) 2006 Free Software Foundation, Inc. 5 6# This program is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 2, or (at your option) 9# any later version. 10 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15 16# You should have received a copy of the GNU General Public License 17# along with this program; if not, write to the Free Software 18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19# 02110-1301, USA. 20 21# Description: Incremental archives should be able to handle directories 22# moved between directory hierarchies. 23 24AT_SETUP([move between hierarchies]) 25AT_KEYWORDS([incremental rename rename02]) 26 27AT_TAR_CHECK([ 28AT_SORT_PREREQ 29mkdir foo 30genfile --file foo/file1 31genfile --file foo/file2 32mkdir foo/bar 33genfile --file foo/bar/file.r 34mkdir foo/bar/baz 35genfile --file foo/bar/baz/file.z 36 37echo "Creating base archive" 38tar -g incr -cf arch.1 -v foo 39 40mv foo/bar/baz foo 41 42echo "Creating incremental archive" 43tar -g incr -cf arch.2 -v foo 44 45mv foo old 46 47tar xfg arch.1 /dev/null 2>tmperr 48sort tmperr >&2 49 50echo "Begin directory listing 1" 51find foo | sort 52echo "End directory listing 1" 53 54tar xfgv arch.2 /dev/null 55echo Begin directory listing 2 56find foo | sort 57echo End directory listing 2 58], 59[0], 60[Creating base archive 61foo/ 62foo/bar/ 63foo/bar/baz/ 64foo/file1 65foo/file2 66foo/bar/file.r 67foo/bar/baz/file.z 68Creating incremental archive 69foo/ 70foo/bar/ 71foo/baz/ 72Begin directory listing 1 73foo 74foo/bar 75foo/bar/baz 76foo/bar/baz/file.z 77foo/bar/file.r 78foo/file1 79foo/file2 80End directory listing 1 81foo/ 82foo/bar/ 83foo/baz/ 84Begin directory listing 2 85foo 86foo/bar 87foo/bar/file.r 88foo/baz 89foo/baz/file.z 90foo/file1 91foo/file2 92End directory listing 2 93], 94[tar: foo/bar: Directory is new 95tar: foo/bar/baz: Directory is new 96tar: foo/baz: Directory has been renamed from `foo/bar/baz' 97], 98[],[],[gnu, oldgnu, posix]) 99 100AT_CLEANUP 101 102# End of rename02.at 103