T-null2.at 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # This file is part of test suite for GNU tar. -*- Autotest -*-
  2. # Copyright 2015-2023 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. :\\.jpg
  26. ])
  27. genfile -f a
  28. genfile -f -b
  29. genfile -f '--c d'
  30. genfile -f ':\\.jpg'
  31. cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T -
  32. ],
  33. [0],
  34. [a
  35. -b
  36. --c d
  37. :\\\\.jpg
  38. ],
  39. [],[],[],[ustar]) # Testing one format is enough
  40. AT_CLEANUP