Debian Codegraph @

tests/extrac25.at

raw
1 # Test suite for GNU tar. -*- autotest -*-
2 # Copyright 2022-2023 Free Software Foundation, Inc.
3 #
4 # This file is part of GNU tar.
5 #
6 # GNU tar 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 3 of the License, or
9 # (at your option) any later version.
10 #
11 # GNU tar 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, see <http://www.gnu.org/licenses/>.
18 AT_SETUP([extract over parent dir that is dangling symlink])
19 AT_KEYWORDS([extract extrac25])
20
21 AT_TAR_CHECK([
22 mkdir subdir
23 touch subdir/a.txt
24 tar -cf test.tar subdir/a.txt
25
26 rm -rf subdir
27 ln -s does_not_exist subdir
28 tar -xvf test.tar
29 ],
30 [2],
31 [subdir/a.txt
32 ],
33 [tar: subdir: Cannot mkdir: File exists
34 tar: subdir/a.txt: Cannot open: No such file or directory
35 tar: Exiting with failure status due to previous errors
36 ])
37
38 AT_CLEANUP