diff options
Diffstat (limited to 'Tests')
20 files changed, 409 insertions, 7 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets-release-leaf-byproduct-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets-release-leaf-byproduct-ninja-check.cmake new file mode 100644 index 0000000..b2d67b4 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets-release-leaf-byproduct-ninja-check.cmake @@ -0,0 +1,5 @@ +check_files("${RunCMake_TEST_BINARY_DIR}" + INCLUDE + ${TARGET_BYPRODUCTS_LeafExe} + ${TARGET_BYPRODUCTS_RootCustom} + ) diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets-release-leaf-exe-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets-release-leaf-exe-ninja-check.cmake index 3f51983..e29dab6 100644 --- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets-release-leaf-exe-ninja-check.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets-release-leaf-exe-ninja-check.cmake @@ -1,6 +1,7 @@ check_files("${RunCMake_TEST_BINARY_DIR}" INCLUDE ${TARGET_FILE_LeafExe_Release} + ${TARGET_BYPRODUCTS_LeafExe} ${TARGET_BYPRODUCTS_RootCustom} ${TARGET_FILE_RootExe_Release} ) diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake index b6f1152..7bed090 100644 --- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake @@ -35,13 +35,15 @@ add_subdirectory(CustomCommandsAndTargetsSubdir) create_targets(Top) add_executable(RootExe main.c) -add_custom_target(RootCustom COMMAND ${CMAKE_COMMAND} -E touch Root.txt BYPRODUCTS Root.txt) -add_executable(LeafExe main.c) -add_custom_target(LeafCustom COMMAND ${CMAKE_COMMAND} -E touch Leaf.txt BYPRODUCTS Leaf.txt DEPENDS RootCustom RootExe) -add_dependencies(LeafExe RootExe RootCustom) +add_custom_target(RootCustom COMMAND ${CMAKE_COMMAND} -E touch RootCustom.txt BYPRODUCTS RootCustom.txt) +add_custom_command(OUTPUT main.c COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.c ${CMAKE_CURRENT_BINARY_DIR}/main.c DEPENDS RootCustom) +add_executable(LeafExe ${CMAKE_CURRENT_BINARY_DIR}/main.c) +add_custom_target(LeafCustom COMMAND ${CMAKE_COMMAND} -E touch LeafCustom.txt BYPRODUCTS LeafCustom.txt DEPENDS RootCustom RootExe) +add_dependencies(LeafExe RootExe) file(APPEND "${CMAKE_BINARY_DIR}/target_files_custom.cmake" -"set(TARGET_BYPRODUCTS_LeafCustom [==[${CMAKE_CURRENT_BINARY_DIR}/Leaf.txt]==]) -set(TARGET_BYPRODUCTS_RootCustom [==[${CMAKE_CURRENT_BINARY_DIR}/Root.txt]==]) +"set(TARGET_BYPRODUCTS_LeafCustom [==[${CMAKE_CURRENT_BINARY_DIR}/LeafCustom.txt]==]) +set(TARGET_BYPRODUCTS_LeafExe [==[${CMAKE_CURRENT_BINARY_DIR}/main.c]==]) +set(TARGET_BYPRODUCTS_RootCustom [==[${CMAKE_CURRENT_BINARY_DIR}/RootCustom.txt]==]) ") include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake) diff --git a/Tests/RunCMake/NinjaMultiConfig/Qt5-automoc-check-ninja-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/Qt5-automoc-check-ninja-stdout.txt new file mode 100644 index 0000000..85d5fdc --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/Qt5-automoc-check-ninja-stdout.txt @@ -0,0 +1,7 @@ + input: CUSTOM_COMMAND( + [^ +]*)* + \|\| exe_autogen_timestamp_deps:Debug( + [^ +]*)* + outputs: diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake index 86d726b..ec8804b 100644 --- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake @@ -236,9 +236,11 @@ run_ninja(CustomCommandsAndTargets release-postbuild build-Release.ninja SubdirP run_cmake_build(CustomCommandsAndTargets debug-targetpostbuild Debug TopTargetPostBuild) run_ninja(CustomCommandsAndTargets release-targetpostbuild build-Release.ninja SubdirTargetPostBuild) run_cmake_build(CustomCommandsAndTargets release-clean Release clean:all) -run_ninja(CustomCommandsAndTargets release-leaf-custom build-Release.ninja Leaf.txt) +run_ninja(CustomCommandsAndTargets release-leaf-custom build-Release.ninja LeafCustom.txt) run_cmake_build(CustomCommandsAndTargets release-clean Release clean:all) run_ninja(CustomCommandsAndTargets release-leaf-exe build-Release.ninja LeafExe) +run_cmake_build(CustomCommandsAndTargets release-clean Release clean:all) +run_ninja(CustomCommandsAndTargets release-leaf-byproduct build-Release.ninja main.c) unset(RunCMake_TEST_BINARY_DIR) @@ -314,4 +316,7 @@ if(CMake_TEST_Qt5) unset(RunCMake_TEST_OPTIONS) include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) run_cmake_build(Qt5 debug-in-release-graph Release exe:Debug) + if(CMAKE_TEST_Qt5Core_Version VERSION_GREATER_EQUAL 5.15.0) + run_ninja(Qt5 automoc-check build-Debug.ninja -t query exe_autogen/timestamp) + endif() endif() diff --git a/Tests/RunCMake/string/JSON.cmake b/Tests/RunCMake/string/JSON.cmake new file mode 100644 index 0000000..ab4194d --- /dev/null +++ b/Tests/RunCMake/string/JSON.cmake @@ -0,0 +1,342 @@ +function(assert_strequal actual expected) + if(NOT expected STREQUAL actual) + message(SEND_ERROR "Output:\n${actual}\nDid not match expected:\n${expected}\n") + endif() +endfunction() + +function(assert_strequal_error actual expected error) + if(error) + message(SEND_ERROR "Unexpected error: ${error}") + endif() + assert_strequal("${actual}" "${expected}") +endfunction() + +function(assert_json_equal error actual expected) + if(error) + message(SEND_ERROR "Unexpected error: ${error}") + endif() + string(JSON eql EQUAL "${actual}" "${expected}") + if(NOT eql) + message(SEND_ERROR "Expected equality got\n ${actual}\n expected\n${expected}") + endif() +endfunction() + +# test EQUAL +string(JSON result EQUAL +[=[ {"foo":"bar"} ]=] +[=[ +{ +"foo": "bar" +} +]=]) +if(NOT result) + message(SEND_ERROR "Expected ON got ${result}") +endif() + +string(JSON result EQUAL +[=[ {"foo":"bar"} ]=] +[=[ +{ +"foo1": "bar" +} +]=]) +if(result) + message(SEND_ERROR "Expected OFF got ${result}") +endif() + + + +set(json1 [=[ +{ + "foo" : "bar", + "array" : [5, "val", {"some": "other"}, null], + "types" : { + "null" : null, + "number" : 5, + "string" : "foo", + "boolean" : false, + "array" : [1,2,3], + "object" : {} + }, + "values" : { + "null" : null, + "number" : 5, + "string" : "foo", + "false" : false, + "true" : true + }, + "special" : { + "foo;bar" : "value1", + ";" : "value2", + "semicolon" : ";", + "list" : ["one", "two;three", "four"], + "quote" : "\"", + "\"" : "quote", + "backslash" : "\\", + "\\" : "backslash", + "slash" : "\/", + "\/" : "slash", + "newline" : "\n", + "\n" : "newline", + "return" : "\r", + "\r" : "return", + "tab" : "\t", + "\t" : "tab", + "backspace" : "\b", + "\b" : "backspace", + "formfeed" : "\f", + "\f" : "formfeed" + } +} +]=]) + +string(JSON result GET "${json1}" foo) +assert_strequal("${result}" bar) +string(JSON result GET "${json1}" array 0) +assert_strequal("${result}" 5) +string(JSON result GET "${json1}" array 1) +assert_strequal("${result}" val) +string(JSON result GET "${json1}" array 2 some) +assert_strequal("${result}" other) + +string(JSON result GET "${json1}" values null) +assert_strequal("${result}" "") +string(JSON result GET "${json1}" values number) +assert_strequal("${result}" 5) +string(JSON result GET "${json1}" values string) +assert_strequal("${result}" "foo") +string(JSON result GET "${json1}" values true) +assert_strequal("${result}" "ON") +if(NOT result) + message(SEND_ERROR "Output did not match expected: TRUE actual: ${result}") +endif() +string(JSON result GET "${json1}" values false) +assert_strequal("${result}" "OFF") +if(result) + message(SEND_ERROR "Output did not match expected: FALSE actual: ${result}") +endif() + +string(JSON result ERROR_VARIABLE error GET "${json1}" foo) +assert_strequal_error("${result}" "bar" "${error}") + +string(JSON result ERROR_VARIABLE error GET "${json1}" notThere) +assert_strequal("${result}" "notThere-NOTFOUND") +assert_strequal("${error}" "member 'notThere' not found") + +string(JSON result ERROR_VARIABLE error GET "${json1}" 0) +assert_strequal("${result}" "0-NOTFOUND") +assert_strequal("${error}" "member '0' not found") + +string(JSON result ERROR_VARIABLE error GET "${json1}" array 10) +assert_strequal("${result}" "array-10-NOTFOUND") +assert_strequal("${error}" "expected an index less then 4 got '10'") + +string(JSON result ERROR_VARIABLE error GET "${json1}" array 2 some notThere) +assert_strequal("${result}" "array-2-some-notThere-NOTFOUND") +assert_strequal("${error}" "invalid path 'array 2 some notThere', need element of OBJECT or ARRAY type to lookup 'notThere' got STRING") + +# special chars +string(JSON result ERROR_VARIABLE error GET "${json1}" special "foo;bar") +assert_strequal_error("${result}" "value1" "${error}") +string(JSON result ERROR_VARIABLE error GET "${json1}" special ";") +assert_strequal_error("${result}" "value2" "${error}") +string(JSON result ERROR_VARIABLE error GET "${json1}" special semicolon) +assert_strequal_error("${result}" ";" "${error}") + +string(JSON result ERROR_VARIABLE error GET "${json1}" special list 1) +assert_strequal_error("${result}" "two;three" "${error}") + +string(JSON result ERROR_VARIABLE error GET "${json1}") +assert_json_equal("${error}" "${result}" "${json1}") + +string(JSON result ERROR_VARIABLE error GET "${json1}" array) +assert_json_equal("${error}" "${result}" [=[ [5, "val", {"some": "other"}, null] ]=]) + +string(JSON result ERROR_VARIABLE error GET "${json1}" special quote) +assert_strequal_error("${result}" "\"" "${error}") +string(JSON result ERROR_VARIABLE error GET "${json1}" special "\"") +assert_strequal_error("${result}" "quote" "${error}") + +string(JSON result ERROR_VARIABLE error GET "${json1}" special backslash) +assert_strequal_error("${result}" "\\" "${error}") +string(JSON result ERROR_VARIABLE error GET "${json1}" special "\\") +assert_strequal_error("${result}" "backslash" "${error}") + +string(JSON result ERROR_VARIABLE error GET "${json1}" special slash) +assert_strequal_error("${result}" "/" "${error}") +string(JSON result ERROR_VARIABLE error GET "${json1}" special "/") +assert_strequal_error("${result}" "slash" "${error}") + +string(JSON result ERROR_VARIABLE error GET "${json1}" special newline) +assert_strequal_error("${result}" "\n" "${error}") +string(JSON result ERROR_VARIABLE error GET "${json1}" special "\n") +assert_strequal_error("${result}" "newline" "${error}") + +string(JSON result ERROR_VARIABLE error GET "${json1}" special return) +assert_strequal_error("${result}" "\r" "${error}") +string(JSON result ERROR_VARIABLE error GET "${json1}" special "\r") +assert_strequal_error("${result}" "return" "${error}") + +string(JSON result ERROR_VARIABLE error GET "${json1}" special tab) +assert_strequal_error("${result}" "\t" "${error}") +string(JSON result ERROR_VARIABLE error GET "${json1}" special "\t") +assert_strequal_error("${result}" "tab" "${error}") + +file(READ ${CMAKE_CURRENT_LIST_DIR}/json/unicode.json unicode) +string(JSON char ERROR_VARIABLE error GET "${unicode}" backspace) +string(JSON result ERROR_VARIABLE error GET "${unicode}" "${char}") +assert_strequal_error("${result}" "backspace" "${error}") + +file(READ ${CMAKE_CURRENT_LIST_DIR}/json/unicode.json unicode) +string(JSON char ERROR_VARIABLE error GET "${unicode}" backspace) +string(JSON result ERROR_VARIABLE error GET "${unicode}" "${char}") +assert_strequal_error("${result}" "backspace" "${error}") + +string(JSON char ERROR_VARIABLE error GET "${unicode}" formfeed) +string(JSON result ERROR_VARIABLE error GET "${unicode}" "${char}") +assert_strequal_error("${result}" "formfeed" "${error}") + +string(JSON char ERROR_VARIABLE error GET "${unicode}" datalinkescape) +string(JSON result ERROR_VARIABLE error GET "${unicode}" "${char}") +assert_strequal_error("${result}" "datalinkescape" "${error}") + +# Test TYPE +string(JSON result TYPE "${json1}" types null) +assert_strequal("${result}" NULL) +string(JSON result TYPE "${json1}" types number) +assert_strequal("${result}" NUMBER) +string(JSON result TYPE "${json1}" types string) +assert_strequal("${result}" STRING) +string(JSON result TYPE "${json1}" types boolean) +assert_strequal("${result}" BOOLEAN) +string(JSON result TYPE "${json1}" types array) +assert_strequal("${result}" ARRAY) +string(JSON result TYPE "${json1}" types object) +assert_strequal("${result}" OBJECT) + +# Test LENGTH +string(JSON result ERROR_VARIABLE error LENGTH "${json1}") +assert_strequal("${result}" 5) +if(error) + message(SEND_ERROR "Unexpected error: ${error}") +endif() + +string(JSON result ERROR_VARIABLE error LENGTH "${json1}" array) +assert_strequal("${result}" 4) +if(error) + message(SEND_ERROR "Unexpected error: ${error}") +endif() + +string(JSON result ERROR_VARIABLE error LENGTH "${json1}" foo) +assert_strequal("${result}" "foo-NOTFOUND") +assert_strequal("${error}" "LENGTH needs to be called with an element of type ARRAY or OBJECT, got STRING") + +# Test MEMBER +string(JSON result ERROR_VARIABLE error MEMBER "${json1}" values 2) +assert_strequal("${result}" "number") +if(error) + message(SEND_ERROR "Unexpected error: ${error}") +endif() + +string(JSON result ERROR_VARIABLE error MEMBER "${json1}" values 100) +assert_strequal("${result}" "values-100-NOTFOUND") +assert_strequal("${error}" "expected an index less then 5 got '100'") + +# Test length loops +string(JSON arrayLength ERROR_VARIABLE error LENGTH "${json1}" types array) +if(error) + message(SEND_ERROR "Unexpected error: ${error}") +endif() +set(values "") +math(EXPR arrayLength "${arrayLength}-1") +foreach(index RANGE ${arrayLength}) + string(JSON value ERROR_VARIABLE error GET "${json1}" types array ${index}) + if(error) + message(SEND_ERROR "Unexpected error: ${error}") + endif() + list(APPEND values "${value}") +endforeach() +assert_strequal("${values}" "1;2;3") + +string(JSON valuesLength ERROR_VARIABLE error LENGTH "${json1}" values) +if(error) + message(SEND_ERROR "Unexpected error: ${error}") +endif() +set(values "") +set(members "") +math(EXPR valuesLength "${valuesLength}-1") +foreach(index RANGE ${valuesLength}) + string(JSON member ERROR_VARIABLE error MEMBER "${json1}" values ${index}) + if(error) + message(SEND_ERROR "Unexpected error: ${error}") + endif() + string(JSON value ERROR_VARIABLE error GET "${json1}" values ${member}) + if(error) + message(SEND_ERROR "Unexpected error: ${error}") + endif() + + list(APPEND members "${member}") + list(APPEND values "${value}") +endforeach() +assert_strequal("${members}" "false;null;number;string;true") +assert_strequal("${values}" "OFF;;5;foo;ON") + +# Test REMOVE +set(json2 [=[{ + "foo" : "bar", + "array" : [5, "val", {"some": "other"}, null] +}]=]) +string(JSON result ERROR_VARIABLE error REMOVE ${json2} foo) +assert_json_equal("${error}" "${result}" +[=[{ + "array" : [5, "val", {"some": "other"}, null] +}]=]) + +string(JSON result ERROR_VARIABLE error REMOVE ${json2} array 1) +assert_json_equal("${error}" "${result}" +[=[{ + "foo" : "bar", + "array" : [5, {"some": "other"}, null] +}]=]) + +string(JSON result ERROR_VARIABLE error REMOVE ${json2} array 100) +assert_strequal("${result}" "array-100-NOTFOUND") +assert_strequal("${error}" "expected an index less then 4 got '100'") + +# Test SET +string(JSON result ERROR_VARIABLE error SET ${json2} new 5) +assert_json_equal("${error}" "${result}" +[=[{ + "foo" : "bar", + "array" : [5, "val", {"some": "other"}, null], + "new" : 5 +}]=]) + +string(JSON result ERROR_VARIABLE error SET ${json2} new [=[ {"obj" : false} ]=]) +assert_json_equal("${error}" "${result}" +[=[{ + "foo" : "bar", + "array" : [5, "val", {"some": "other"}, null], + "new" : {"obj" : false} +}]=]) + +string(JSON result ERROR_VARIABLE error SET ${json2} array 0 6) +assert_json_equal("${error}" "${result}" +[=[{ + "foo" : "bar", + "array" : [6, "val", {"some": "other"}, null] +}]=]) + +string(JSON result ERROR_VARIABLE error SET ${json2} array 5 [["append"]]) +assert_json_equal("${error}" "${result}" +[=[{ + "foo" : "bar", + "array" : [5, "val", {"some": "other"}, null, "append"] +}]=]) + +string(JSON result ERROR_VARIABLE error SET ${json2} array 100 [["append"]]) +assert_json_equal("${error}" "${result}" +[=[{ + "foo" : "bar", + "array" : [5, "val", {"some": "other"}, null, "append"] +}]=]) diff --git a/Tests/RunCMake/string/JSONNoArgs-result.txt b/Tests/RunCMake/string/JSONNoArgs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/string/JSONNoArgs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/string/JSONNoArgs-stderr.txt b/Tests/RunCMake/string/JSONNoArgs-stderr.txt new file mode 100644 index 0000000..426735a --- /dev/null +++ b/Tests/RunCMake/string/JSONNoArgs-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at JSONNoArgs.cmake:1 \(string\): + string sub-command JSON missing out-var argument. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/JSONNoArgs.cmake b/Tests/RunCMake/string/JSONNoArgs.cmake new file mode 100644 index 0000000..4463fe4 --- /dev/null +++ b/Tests/RunCMake/string/JSONNoArgs.cmake @@ -0,0 +1 @@ +string(JSON) diff --git a/Tests/RunCMake/string/JSONNoJson-result.txt b/Tests/RunCMake/string/JSONNoJson-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/string/JSONNoJson-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/string/JSONNoJson-stderr.txt b/Tests/RunCMake/string/JSONNoJson-stderr.txt new file mode 100644 index 0000000..26804df --- /dev/null +++ b/Tests/RunCMake/string/JSONNoJson-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at JSONNoJson.cmake:1 \(string\): + string sub-command JSON missing json string argument. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/JSONNoJson.cmake b/Tests/RunCMake/string/JSONNoJson.cmake new file mode 100644 index 0000000..4f819f1 --- /dev/null +++ b/Tests/RunCMake/string/JSONNoJson.cmake @@ -0,0 +1 @@ +string(JSON var GET) diff --git a/Tests/RunCMake/string/JSONOneArg-result.txt b/Tests/RunCMake/string/JSONOneArg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/string/JSONOneArg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/string/JSONOneArg-stderr.txt b/Tests/RunCMake/string/JSONOneArg-stderr.txt new file mode 100644 index 0000000..282139c --- /dev/null +++ b/Tests/RunCMake/string/JSONOneArg-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at JSONOneArg.cmake:1 \(string\): + string sub-command JSON missing mode argument. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/JSONOneArg.cmake b/Tests/RunCMake/string/JSONOneArg.cmake new file mode 100644 index 0000000..143f9ca --- /dev/null +++ b/Tests/RunCMake/string/JSONOneArg.cmake @@ -0,0 +1 @@ +string(JSON var) diff --git a/Tests/RunCMake/string/JSONWrongMode-result.txt b/Tests/RunCMake/string/JSONWrongMode-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/string/JSONWrongMode-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/string/JSONWrongMode-stderr.txt b/Tests/RunCMake/string/JSONWrongMode-stderr.txt new file mode 100644 index 0000000..c70991b --- /dev/null +++ b/Tests/RunCMake/string/JSONWrongMode-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at JSONWrongMode.cmake:1 \(string\): + string sub-command JSON got an invalid mode 'FOO', expected one of GET, + GET_ARRAY, TYPE, MEMBER, MEMBERS, LENGTH, REMOVE, SET, EQUAL. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/JSONWrongMode.cmake b/Tests/RunCMake/string/JSONWrongMode.cmake new file mode 100644 index 0000000..7301f7a --- /dev/null +++ b/Tests/RunCMake/string/JSONWrongMode.cmake @@ -0,0 +1 @@ +string(JSON var FOO) diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake index bb7cb17..ff0bb51 100644 --- a/Tests/RunCMake/string/RunCMakeTest.cmake +++ b/Tests/RunCMake/string/RunCMakeTest.cmake @@ -1,5 +1,12 @@ include(RunCMake) +run_cmake(JSON) + +run_cmake(JSONNoJson) +run_cmake(JSONWrongMode) +run_cmake(JSONOneArg) +run_cmake(JSONNoArgs) + run_cmake(Append) run_cmake(AppendNoArgs) diff --git a/Tests/RunCMake/string/json/unicode.json b/Tests/RunCMake/string/json/unicode.json new file mode 100644 index 0000000..86fd232 --- /dev/null +++ b/Tests/RunCMake/string/json/unicode.json @@ -0,0 +1,8 @@ +{ + "backspace" : "\b", + "\b" : "backspace", + "formfeed" : "\f", + "\f" : "formfeed" , + "datalinkescape" : "\u0010", + "\u0010" : "datalinkescape" +} |