extrac19.at 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. #
  3. # Test suite for GNU tar.
  4. # Copyright (C) 2011 Free Software Foundation, Inc.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3, or (at your option)
  9. # any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. AT_SETUP([skip-old-files])
  19. AT_KEYWORDS([extract extrac19 old-files skip-old-files])
  20. AT_TAR_CHECK([
  21. mkdir dir
  22. cd dir
  23. echo 'Old file a' > a
  24. echo 'Old file b' > b
  25. tar cf ../archive .
  26. rm b
  27. echo 'File a' > a
  28. tar -x --skip-old-files -f ../archive
  29. echo status=$?
  30. cat a
  31. ],
  32. [0],
  33. [status=0
  34. File a
  35. ])
  36. AT_CLEANUP