summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/File_Configure
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2021-01-29 10:57:03 (GMT)
committerCristian Adam <cristian.adam@gmail.com>2021-01-29 13:25:33 (GMT)
commit6e225efd8cd1c20bd45c062b168d79a6addb78e5 (patch)
tree6dbb81a6e9e86bf0717485430d0dba44a0980384 /Tests/RunCMake/File_Configure
parent59b5b6e11c243e4d45e57caf939107ef9fc44c75 (diff)
downloadCMake-6e225efd8cd1c20bd45c062b168d79a6addb78e5.zip
CMake-6e225efd8cd1c20bd45c062b168d79a6addb78e5.tar.gz
CMake-6e225efd8cd1c20bd45c062b168d79a6addb78e5.tar.bz2
file(CONFIGURE): Fix newlines in CONTENT
Fixes: #21749
Diffstat (limited to 'Tests/RunCMake/File_Configure')
-rw-r--r--Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake b/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake
index e384873..09aec45 100644
--- a/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake
+++ b/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake
@@ -1,10 +1,13 @@
set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt)
function(test_eol style in out)
+ if (style)
+ set(newline_stle NEWLINE_STYLE ${style})
+ endif()
file(CONFIGURE
OUTPUT ${file_name}
CONTENT "@in@"
- NEWLINE_STYLE ${style}
+ ${newline_stle}
)
file(READ ${file_name} new HEX)
if(NOT "${new}" STREQUAL "${out}")
@@ -18,3 +21,5 @@ test_eol(CRLF "c" "630d0a")
test_eol(UNIX "d" "640a")
test_eol(LF "e" "650a")
+
+test_eol("" "a\nb" "610a62")