exclude05.at 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. # Test the functioning of many items in an exclude list (should run quickly)
  14. AT_SETUP([exclude: lots of excludes])
  15. AT_KEYWORDS([exclude exclude05])
  16. AT_TAR_CHECK([
  17. AT_SORT_PREREQ
  18. rm -rf testdir exclfile
  19. mkdir -p testdir
  20. `awk 'BEGIN {for (i=9; i < 100; ++i ) { print > "testdir/file" i; }}'`
  21. `awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i > "exclfile"; }}'`
  22. tar cf archive --anchored --exclude-from=exclfile \
  23. testdir
  24. tar tf archive | sort
  25. echo "NEXT"
  26. tar cf archive --exclude-from=exclfile \
  27. testdir
  28. tar tf archive | sort
  29. rm -rf testdir exclfile
  30. ],
  31. [0],
  32. [testdir/
  33. testdir/file10
  34. testdir/file11
  35. testdir/file9
  36. NEXT
  37. testdir/
  38. testdir/file10
  39. testdir/file11
  40. testdir/file9
  41. ])
  42. AT_CLEANUP