summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-01 15:06:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-02-01 15:06:27 (GMT)
commita28bb8de23ea27060b39e31d3a96f53260c65d42 (patch)
treed99d2300002ee7adfa5fe5e1a8843810c21c57fd /Tests
parente9875b6164ae7d7cb4f8ff70d62bf71b32b31a9e (diff)
parent6e225efd8cd1c20bd45c062b168d79a6addb78e5 (diff)
downloadCMake-a28bb8de23ea27060b39e31d3a96f53260c65d42.zip
CMake-a28bb8de23ea27060b39e31d3a96f53260c65d42.tar.gz
CMake-a28bb8de23ea27060b39e31d3a96f53260c65d42.tar.bz2
Merge topic 'file-configure-newline'
6e225efd8c file(CONFIGURE): Fix newlines in CONTENT Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5747
Diffstat (limited to 'Tests')
-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")