summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/execute_process
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/execute_process')
-rw-r--r--Tests/RunCMake/execute_process/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/execute_process/Encoding.cmake6
-rw-r--r--Tests/RunCMake/execute_process/EncodingMissing-result.txt1
-rw-r--r--Tests/RunCMake/execute_process/EncodingMissing-stderr.txt4
-rw-r--r--Tests/RunCMake/execute_process/EncodingMissing.cmake1
-rw-r--r--Tests/RunCMake/execute_process/EncodingUTF8-stderr.txt1
-rw-r--r--Tests/RunCMake/execute_process/RunCMakeTest.cmake5
7 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/execute_process/CMakeLists.txt b/Tests/RunCMake/execute_process/CMakeLists.txt
new file mode 100644
index 0000000..a640c56
--- /dev/null
+++ b/Tests/RunCMake/execute_process/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.7)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/execute_process/Encoding.cmake b/Tests/RunCMake/execute_process/Encoding.cmake
new file mode 100644
index 0000000..3dc7c39
--- /dev/null
+++ b/Tests/RunCMake/execute_process/Encoding.cmake
@@ -0,0 +1,6 @@
+execute_process(
+ COMMAND ${TEST_ENCODING_EXE} ${TEST_ENCODING} ${CMAKE_CURRENT_LIST_DIR}/EncodingUTF8-stderr.txt
+ OUTPUT_VARIABLE out
+ ENCODING ${TEST_ENCODING}
+ )
+message("${out}")
diff --git a/Tests/RunCMake/execute_process/EncodingMissing-result.txt b/Tests/RunCMake/execute_process/EncodingMissing-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EncodingMissing-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/execute_process/EncodingMissing-stderr.txt b/Tests/RunCMake/execute_process/EncodingMissing-stderr.txt
new file mode 100644
index 0000000..1a69579
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EncodingMissing-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at EncodingMissing.cmake:[0-9]+ \(execute_process\):
+ execute_process called with no value for ENCODING.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/execute_process/EncodingMissing.cmake b/Tests/RunCMake/execute_process/EncodingMissing.cmake
new file mode 100644
index 0000000..ae97480
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EncodingMissing.cmake
@@ -0,0 +1 @@
+execute_process(ENCODING)
diff --git a/Tests/RunCMake/execute_process/EncodingUTF8-stderr.txt b/Tests/RunCMake/execute_process/EncodingUTF8-stderr.txt
new file mode 100644
index 0000000..0ac68de
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EncodingUTF8-stderr.txt
@@ -0,0 +1 @@
+यूनिकोड είναι very здорово!
diff --git a/Tests/RunCMake/execute_process/RunCMakeTest.cmake b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
index 2080437..62e18c6 100644
--- a/Tests/RunCMake/execute_process/RunCMakeTest.cmake
+++ b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
@@ -6,3 +6,8 @@ unset(RunCMake_TEST_OUTPUT_MERGE)
run_cmake_command(MergeOutputFile ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/MergeOutputFile.cmake)
run_cmake_command(MergeOutputVars ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/MergeOutputVars.cmake)
+
+run_cmake(EncodingMissing)
+if(TEST_ENCODING_EXE)
+ run_cmake_command(EncodingUTF8 ${CMAKE_COMMAND} -DTEST_ENCODING=UTF8 -DTEST_ENCODING_EXE=${TEST_ENCODING_EXE} -P ${RunCMake_SOURCE_DIR}/Encoding.cmake)
+endif()