summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file/COPY_FILE-file-replace.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-03 12:18:32 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-03 12:18:32 (GMT)
commit95faf9cb966d03899d6b3c3f6d8c48c46386fadd (patch)
tree94b06b681df3b8ac418d6da33b1b90d4f51e0657 /Tests/RunCMake/file/COPY_FILE-file-replace.cmake
parent9d7ebb47ea30a75617778686ba187fa6d5e91f45 (diff)
parent9c33ff4dda643f8a93d55f9895e31dce9056134f (diff)
downloadCMake-95faf9cb966d03899d6b3c3f6d8c48c46386fadd.zip
CMake-95faf9cb966d03899d6b3c3f6d8c48c46386fadd.tar.gz
CMake-95faf9cb966d03899d6b3c3f6d8c48c46386fadd.tar.bz2
Merge branch 'master' into ci-sccache-consistent-builds
Diffstat (limited to 'Tests/RunCMake/file/COPY_FILE-file-replace.cmake')
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-replace.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/COPY_FILE-file-replace.cmake b/Tests/RunCMake/file/COPY_FILE-file-replace.cmake
new file mode 100644
index 0000000..40e4290
--- /dev/null
+++ b/Tests/RunCMake/file/COPY_FILE-file-replace.cmake
@@ -0,0 +1,9 @@
+set(oldname "${CMAKE_CURRENT_BINARY_DIR}/input")
+set(newname "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(WRITE "${oldname}" "a")
+file(WRITE "${newname}" "b")
+file(COPY_FILE "${oldname}" "${newname}")
+file(READ "${newname}" new)
+if(NOT "${new}" STREQUAL "a")
+ message(FATAL_ERROR "New name:\n ${newname}\ndoes not contain expected content 'a'.")
+endif()