exclude04.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: case insensitive])
  14. AT_KEYWORDS([exclude exclude04])
  15. AT_TAR_CHECK([
  16. AT_SORT_PREREQ
  17. rm -rf testdir
  18. mkdir -p testdir/dir
  19. touch testdir/file1
  20. touch testdir/file2
  21. touch testdir/file3
  22. touch testdir/file4
  23. touch testdir/dir/File1
  24. touch testdir/dir/File2
  25. touch testdir/dir/File3
  26. touch testdir/dir/File4
  27. tar cf archive --exclude=FILE2 \
  28. --exclude=file1 \
  29. --ignore-case \
  30. --exclude=file3 \
  31. --no-ignore-case \
  32. --exclude=FILE2 \
  33. --exclude=file4 \
  34. testdir
  35. tar tf archive | sort
  36. echo "SUB 1"
  37. tar cf archive testdir
  38. tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
  39. echo "SUB 2"
  40. tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
  41. echo "SUB 3"
  42. tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
  43. rm -rf testdir
  44. ],
  45. [0],
  46. [testdir/
  47. testdir/dir/
  48. testdir/dir/File1
  49. testdir/dir/File2
  50. testdir/dir/File4
  51. testdir/file2
  52. SUB 1
  53. testdir/dir/File2
  54. SUB 2
  55. testdir/dir/File2
  56. testdir/file2
  57. SUB 3
  58. testdir/dir/File2
  59. ])
  60. AT_CLEANUP