| 1 |
# Process this file with autom4te to create testsuite. -*- Autotest -*- |
| 2 |
|
| 3 |
# Test suite for GNU tar. |
| 4 |
# Copyright 2009-2023 Free Software Foundation, Inc. |
| 5 |
|
| 6 |
# This file is part of GNU tar. |
| 7 |
|
| 8 |
# GNU tar is free software; you can redistribute it and/or modify |
| 9 |
# it under the terms of the GNU General Public License as published by |
| 10 |
# the Free Software Foundation; either version 3 of the License, or |
| 11 |
# (at your option) any later version. |
| 12 |
|
| 13 |
# GNU tar is distributed in the hope that it will be useful, |
| 14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
# GNU General Public License for more details. |
| 17 |
|
| 18 |
# You should have received a copy of the GNU General Public License |
| 19 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 |
|
| 21 |
# Description: If dir is a directory and arc is a tar archive which |
| 22 |
# contains that directory, and dir contains some modifications added |
| 23 |
# after adding it to the archive, then 'tar -u dir' would add dir/ to |
| 24 |
# the archive. |
| 25 |
# Last-Affected-Version: 1.22.90 |
| 26 |
# References: <[email protected]> |
| 27 |
# http://lists.gnu.org/archive/html/bug-tar/2009-10/msg00017.html |
| 28 |
|
| 29 |
AT_SETUP([update directories]) |
| 30 |
AT_KEYWORDS([update update01]) |
| 31 |
|
| 32 |
AT_TAR_CHECK([ |
| 33 |
AT_SORT_PREREQ |
| 34 |
mkdir a |
| 35 |
genfile --file a/b |
| 36 |
|
| 37 |
tar cf arc a |
| 38 |
|
| 39 |
echo "separator" |
| 40 |
|
| 41 |
sleep 2 |
| 42 |
genfile --file a/c |
| 43 |
|
| 44 |
tar ufv arc a |
| 45 |
echo "separator" |
| 46 |
tar tf arc | sort || exit 1 |
| 47 |
], |
| 48 |
[0], |
| 49 |
[separator |
| 50 |
a/c |
| 51 |
separator |
| 52 |
a/ |
| 53 |
a/b |
| 54 |
a/c |
| 55 |
]) |
| 56 |
|
| 57 |
AT_CLEANUP |