| 1 |
# This file is part of test suite for GNU tar. -*- Autotest -*- |
| 2 |
# Copyright 2015-2023 Free Software Foundation, Inc. |
| 3 |
# |
| 4 |
# GNU tar is free software; you can redistribute it and/or modify |
| 5 |
# it under the terms of the GNU General Public License as published by |
| 6 |
# the Free Software Foundation; either version 3 of the License, or |
| 7 |
# (at your option) any later version. |
| 8 |
# |
| 9 |
# GNU tar is distributed in the hope that it will be useful, |
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
# GNU General Public License for more details. |
| 13 |
# |
| 14 |
# You should have received a copy of the GNU General Public License |
| 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
|
| 17 |
AT_SETUP([--null enables verbatim reading]) |
| 18 |
AT_KEYWORDS([files-from null T-null2 T-verbatim]) |
| 19 |
|
| 20 |
# According to the docs, --null should read each line from the file |
| 21 |
# list verbatim. This feature was broken by commit 26538c9b (tar version |
| 22 |
# 1.27). |
| 23 |
|
| 24 |
AT_TAR_CHECK([ |
| 25 |
AT_DATA([file-list],[a |
| 26 |
-b |
| 27 |
--c d |
| 28 |
:\\.jpg |
| 29 |
]) |
| 30 |
|
| 31 |
genfile -f a |
| 32 |
genfile -f -b |
| 33 |
genfile -f '--c d' |
| 34 |
genfile -f ':\\.jpg' |
| 35 |
|
| 36 |
cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T - |
| 37 |
], |
| 38 |
[0], |
| 39 |
[a |
| 40 |
-b |
| 41 |
--c d |
| 42 |
:\\\\.jpg |
| 43 |
], |
| 44 |
[],[],[],[ustar]) # Testing one format is enough |
| 45 |
|
| 46 |
AT_CLEANUP |