exclude04.at 1.8 KB

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