exclude03.at 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Copyright (C) 2009 Free Software Foundation, Inc.
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 3, or (at your option)
  6. # any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. AT_SETUP([exclude: wildcards match slash])
  14. AT_KEYWORDS([exclude exclude03])
  15. AT_TAR_CHECK([
  16. AT_SORT_PREREQ
  17. rm -rf testdir
  18. mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
  19. touch testdir/\*f\*1
  20. touch testdir/dir1/file1
  21. touch testdir/dir1/\*
  22. touch testdir/dir2/file2
  23. touch testdir/dir2/\*
  24. touch testdir/dir3/file3
  25. touch testdir/dir3/\*
  26. tar cf archive --exclude='testdir*f*1' \
  27. --no-wildcards-match-slash \
  28. --exclude='testdir*f*2' \
  29. --wildcards-match-slash \
  30. --exclude='testdir*f*3' \
  31. testdir
  32. tar tf archive | sort
  33. echo "NEXT"
  34. tar cf archive testdir
  35. tar t --wildcards 'testdir/*f*1' -f archive | sort
  36. echo "NEXT"
  37. tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
  38. echo "NEXT"
  39. tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
  40. rm -rf testdir
  41. ],
  42. [0],
  43. [testdir/
  44. testdir/dir1/
  45. testdir/dir1/*
  46. testdir/dir2/
  47. testdir/dir2/*
  48. testdir/dir2/file2
  49. testdir/dir3/
  50. testdir/dir3/*
  51. NEXT
  52. testdir/*f*1
  53. testdir/dir1/file1
  54. NEXT
  55. testdir/*f*1
  56. NEXT
  57. testdir/*f*1
  58. testdir/dir1/file1
  59. ])
  60. AT_CLEANUP