From e68ea269d72773e53db0c6c6848f6f69f3fd7329 Mon Sep 17 00:00:00 2001 From: Tushar Maheshwari Date: Thu, 27 Dec 2018 22:05:32 +0530 Subject: Tests: CREATE_LINK subcommand negative test case --- Tests/RunCMake/file/CREATE_LINK-noarg-result.txt | 1 + Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt | 4 ++++ Tests/RunCMake/file/CREATE_LINK-noarg.cmake | 1 + Tests/RunCMake/file/RunCMakeTest.cmake | 1 + 4 files changed, 7 insertions(+) create mode 100644 Tests/RunCMake/file/CREATE_LINK-noarg-result.txt create mode 100644 Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt create mode 100644 Tests/RunCMake/file/CREATE_LINK-noarg.cmake 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) -- cgit v0.12