]> Dogcows Code - chaz/tar/blob - tests/volume.sh
caa0dc9c78df2ea384f703bc29d03ef2dcbe6a23
[chaz/tar] / tests / volume.sh
1 #! /bin/sh
2
3 # Volume labels are checked on read by fnmatch.
4
5 # This file is part of GNU tar testsuite.
6 # Copyright (C) 2004 Free Software Foundation, Inc.
7 #
8 # This program 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 2, or (at your option)
11 # any later version.
12 #
13 # This program 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, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 # 02111-1307, USA.
22
23 . ./preset
24 TAR_ARCHIVE_FORMATS="gnu oldgnu"
25 . $srcdir/before
26
27 tar -cf archive -V label -T /dev/null || exit 1
28
29 tar xfV archive label || exit 1
30 tar xfV archive 'la?el' || exit 1
31 tar xfV archive 'l*l' || exit 1
32
33 echo 1>&2 -----
34 tar xfV archive lab
35 test $? = 2 || exit 1
36 echo 1>&2 -----
37 tar xfV archive bel
38 test $? = 2 || exit 1
39 echo 1>&2 -----
40 tar xfV archive babel
41 test $? = 2 || exit 1
42
43 err="\
44 -----
45 tar: Volume \`label' does not match \`lab'
46 tar: Error is not recoverable: exiting now
47 -----
48 tar: Volume \`label' does not match \`bel'
49 tar: Error is not recoverable: exiting now
50 -----
51 tar: Volume \`label' does not match \`babel'
52 tar: Error is not recoverable: exiting now
53 "
54
55 . $srcdir/after
This page took 0.0332710000000001 seconds and 3 git commands to generate.