same-order02.at 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2004-2023 Free Software Foundation, Inc.
  4. # This file is part of GNU tar.
  5. # GNU tar is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. # GNU tar is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. # In previous versions a single -C option did not work with --same-order
  16. # (see same-order01.sh). However, multiple -C options worked OK.
  17. # Test if we did not break the correct behavior.
  18. AT_SETUP([multiple -C options])
  19. AT_KEYWORDS([same-order same-order02 chdir])
  20. AT_TAR_CHECK([
  21. genfile -l 1024 -f file1
  22. genfile -l 1024 -f file2
  23. tar cf archive file1 file2
  24. mkdir en
  25. mkdir to
  26. HERE=`pwd`
  27. tar -xf archive --same-order --warning=no-timestamp \
  28. -C $HERE/en file1 \
  29. -C $HERE/to file2 || exit 1
  30. ls en
  31. echo separator
  32. ls to
  33. ],
  34. [0],
  35. [file1
  36. separator
  37. file2
  38. ])
  39. AT_CLEANUP