T-null2.at 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # This file is part of test suite for GNU tar. -*- Autotest -*-
  2. # Copyright 2015 Free Software Foundation, Inc.
  3. #
  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. #
  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. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. AT_SETUP([--null enables verbatim reading])
  17. AT_KEYWORDS([files-from null T-null2 T-verbatim])
  18. # According to the docs, --null should read each line from the file
  19. # list verbatim. This feature was broken by commit 26538c9b (tar version
  20. # 1.27).
  21. AT_TAR_CHECK([
  22. AT_DATA([file-list],[a
  23. -b
  24. --c d
  25. ])
  26. genfile -f a
  27. genfile -f -b
  28. genfile -f '--c d'
  29. cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T -
  30. ],
  31. [0],
  32. [a
  33. -b
  34. --c d
  35. ],
  36. [],[],[],[ustar]) # Testing one format is enough
  37. AT_CLEANUP