summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTushar Maheshwari <tushar27192@gmail.com>2018-12-27 16:35:32 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-16 15:03:35 (GMT)
commite68ea269d72773e53db0c6c6848f6f69f3fd7329 (patch)
tree3c3b8e24c24668f334757f1f211bec51995fa98c
parent45aa9c65a13105ff505e18f5029ef794b7aef9ab (diff)
downloadCMake-e68ea269d72773e53db0c6c6848f6f69f3fd7329.zip
CMake-e68ea269d72773e53db0c6c6848f6f69f3fd7329.tar.gz
CMake-e68ea269d72773e53db0c6c6848f6f69f3fd7329.tar.bz2
Tests: CREATE_LINK subcommand negative test case
-rw-r--r--Tests/RunCMake/file/CREATE_LINK-noarg-result.txt1
-rw-r--r--Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt4
-rw-r--r--Tests/RunCMake/file/CREATE_LINK-noarg.cmake1
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake1
4 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/CREATE_LINK-noarg-result.txt b/Tests/RunCMake/file/CREATE_LINK-noarg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-noarg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt b/Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt
new file mode 100644
index 0000000..12494f8
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CREATE_LINK-noarg\.cmake:[0-9]+ \(file\):
+ file CREATE_LINK must be called with at least two additional arguments
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/file/CREATE_LINK-noarg.cmake b/Tests/RunCMake/file/CREATE_LINK-noarg.cmake
new file mode 100644
index 0000000..65002fa
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-noarg.cmake
@@ -0,0 +1 @@
+file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE})
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 0962c17..4259680 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
include(RunCMake)
run_cmake(CREATE_LINK)
+run_cmake(CREATE_LINK-noarg)
run_cmake(CREATE_LINK-noexist)
run_cmake(DOWNLOAD-hash-mismatch)
run_cmake(DOWNLOAD-unused-argument)