]> Dogcows Code - chaz/tar/blob - tests/volume.sh
4aafc354638bb477d194b0f9e0d70945b0736afb
[chaz/tar] / tests / volume.sh
1 #! /bin/sh
2 # Volume labels are checked on read by fnmatch.
3
4 . ./preset
5 TAR_ARCHIVE_FORMATS="gnu oldgnu"
6 . $srcdir/before
7
8 tar -cf archive -V label -T /dev/null || exit 1
9
10 tar xfV archive label || exit 1
11 tar xfV archive 'la?el' || exit 1
12 tar xfV archive 'l*l' || exit 1
13
14 echo 1>&2 -----
15 tar xfV archive lab
16 test $? = 2 || exit 1
17 echo 1>&2 -----
18 tar xfV archive bel
19 test $? = 2 || exit 1
20 echo 1>&2 -----
21 tar xfV archive babel
22 test $? = 2 || exit 1
23
24 err="\
25 -----
26 tar: Volume \`label' does not match \`lab'
27 tar: Error is not recoverable: exiting now
28 -----
29 tar: Volume \`label' does not match \`bel'
30 tar: Error is not recoverable: exiting now
31 -----
32 tar: Volume \`label' does not match \`babel'
33 tar: Error is not recoverable: exiting now
34 "
35
36 . $srcdir/after
This page took 0.033174 seconds and 3 git commands to generate.