4
0

exclude02.at 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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: anchoring])
  14. AT_KEYWORDS([exclude exclude02])
  15. AT_TAR_CHECK([
  16. AT_SORT_PREREQ
  17. rm -rf testdir
  18. mkdir -p testdir
  19. touch file1.txt
  20. touch testdir/file1.txt
  21. touch testdir/file2
  22. tar cf archive --exclude="file1.txt" \
  23. testdir
  24. tar tf archive | sort
  25. echo "SUB 1"
  26. tar cf archive --no-anchored \
  27. --exclude="file1.txt" \
  28. testdir
  29. tar tf archive | sort
  30. echo "SUB 2"
  31. tar cf archive --anchored \
  32. --exclude="file1.txt" \
  33. testdir
  34. tar tf archive | sort
  35. echo "SUB 3"
  36. tar cf archive testdir file1.txt
  37. tar t "file1.txt" -f archive | sort
  38. echo "SUB 4"
  39. tar t --no-anchored "file1.txt" -f archive | sort
  40. echo "SUB 5"
  41. tar t --anchored "file1.txt" -f archive | sort
  42. rm -rf testdir file1.txt
  43. ],
  44. [0],
  45. [testdir/
  46. testdir/file2
  47. SUB 1
  48. testdir/
  49. testdir/file2
  50. SUB 2
  51. testdir/
  52. testdir/file1.txt
  53. testdir/file2
  54. SUB 3
  55. file1.txt
  56. SUB 4
  57. file1.txt
  58. testdir/file1.txt
  59. SUB 5
  60. file1.txt
  61. ])
  62. AT_CLEANUP