Tests: file CREATE_LINK subcommand test cases
This commit is contained in:
parent
8bb7562f1a
commit
45aa9c65a1
1
Tests/RunCMake/file/CREATE_LINK-noexist-stderr.txt
Normal file
1
Tests/RunCMake/file/CREATE_LINK-noexist-stderr.txt
Normal file
@ -0,0 +1 @@
|
||||
Hard link error: Cannot hard link 'does_not_exist.txt' as it does not exist.
|
9
Tests/RunCMake/file/CREATE_LINK-noexist.cmake
Normal file
9
Tests/RunCMake/file/CREATE_LINK-noexist.cmake
Normal file
@ -0,0 +1,9 @@
|
||||
file(CREATE_LINK does_not_exist.txt TestLink.txt RESULT result)
|
||||
if(NOT result STREQUAL "0")
|
||||
message("Hard link error: ${result}")
|
||||
endif()
|
||||
|
||||
file(CREATE_LINK does_not_exist.txt TestSymLink.txt RESULT sym_result SYMBOLIC)
|
||||
if(NOT sym_result STREQUAL "0")
|
||||
message("Symlink fail: ${sym_result}")
|
||||
endif()
|
9
Tests/RunCMake/file/CREATE_LINK.cmake
Normal file
9
Tests/RunCMake/file/CREATE_LINK.cmake
Normal file
@ -0,0 +1,9 @@
|
||||
file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestLink.cmake RESULT result)
|
||||
if(NOT result STREQUAL "0")
|
||||
message(SEND_ERROR "Hard link result='${result}'")
|
||||
endif()
|
||||
|
||||
file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestSymLink.cmake RESULT sym_result SYMBOLIC)
|
||||
if(NOT sym_result STREQUAL "0")
|
||||
message(SEND_ERROR "Symlink result='${sym_result}'")
|
||||
endif()
|
@ -1,5 +1,7 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(CREATE_LINK)
|
||||
run_cmake(CREATE_LINK-noexist)
|
||||
run_cmake(DOWNLOAD-hash-mismatch)
|
||||
run_cmake(DOWNLOAD-unused-argument)
|
||||
run_cmake(DOWNLOAD-httpheader-not-set)
|
||||
|
Loading…
Reference in New Issue
Block a user