volume.sh 751 B

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