volume.sh 713 B

1234567891011121314151617181920212223242526272829303132333435
  1. #! /bin/sh
  2. # Volume labels are checked on read by fnmatch.
  3. . ./preset
  4. . $srcdir/before
  5. tar cfVT archive label /dev/null || exit 1
  6. tar xfV archive label || exit 1
  7. tar xfV archive 'la?el' || exit 1
  8. tar xfV archive 'l*l' || exit 1
  9. echo 1>&2 -----
  10. tar xfV archive lab
  11. test $? = 2 || exit 1
  12. echo 1>&2 -----
  13. tar xfV archive bel
  14. test $? = 2 || exit 1
  15. echo 1>&2 -----
  16. tar xfV archive babel
  17. test $? = 2 || exit 1
  18. err="\
  19. -----
  20. tar: Volume \`label' does not match \`lab'
  21. tar: Error is not recoverable: exiting now
  22. -----
  23. tar: Volume \`label' does not match \`bel'
  24. tar: Error is not recoverable: exiting now
  25. -----
  26. tar: Volume \`label' does not match \`babel'
  27. tar: Error is not recoverable: exiting now
  28. "
  29. . $srcdir/after