diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-23 17:04:00 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-23 17:04:00 (GMT) |
commit | 14b07c0973f367352a75550af864b56dc99c3848 (patch) | |
tree | c78524be265379c84c4b1658b6d89e737092ef42 /Tests | |
parent | 11d100c94f055f70f478125dace67434a2d1832b (diff) | |
download | CMake-14b07c0973f367352a75550af864b56dc99c3848.zip CMake-14b07c0973f367352a75550af864b56dc99c3848.tar.gz CMake-14b07c0973f367352a75550af864b56dc99c3848.tar.bz2 |
add a test for escape quotes and configure file
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Complex/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/Complex/Executable/complex.cxx | 13 | ||||
-rw-r--r-- | Tests/Complex/cmTestConfigureEscape.h.in | 1 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/complex.cxx | 13 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/cmTestConfigureEscape.h.in | 1 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/complex.cxx | 13 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/cmTestConfigureEscape.h.in | 1 |
9 files changed, 60 insertions, 0 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index 5cead76..bbf72a0 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -156,6 +156,12 @@ CONFIGURE_FILE( ${Complex_SOURCE_DIR}/cmTestConfigure.h.in ${Complex_BINARY_DIR}/cmTestConfigure.h) +SET(STRING_WITH_QUOTES "\"hello world\"") +# test CONFIGURE_FILE with ESCAPE_QUOTES on +CONFIGURE_FILE( + ${Complex_SOURCE_DIR}/cmTestConfigureEscape.h.in + ${Complex_BINARY_DIR}/cmTestConfigureEscape.h ESCAPE_QUOTES) + # # Create the libs and the main exe # diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index fb268c4..0b20bfd 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -1,4 +1,5 @@ #include "cmTestConfigure.h" +#include "cmTestConfigureEscape.h" #include "cmVersion.h" #include "ExtraSources/file1.h" #include "file2.h" @@ -678,6 +679,18 @@ int main() { cmFailed("SEPARATE_ARGUMENTS is not working"); } + + // ---------------------------------------------------------------------- + // Test Escape Quotes + if(strcmp("\"hello world\"", STRING_WITH_QUOTES) == 0) + { + cmPassed("ESCAPE_QUOTES is working"); + } + else + { + cmFailed("ESCAPE_QUOTES is not working"); + } + // ---------------------------------------------------------------------- // Summary diff --git a/Tests/Complex/cmTestConfigureEscape.h.in b/Tests/Complex/cmTestConfigureEscape.h.in new file mode 100644 index 0000000..39a8bd6 --- /dev/null +++ b/Tests/Complex/cmTestConfigureEscape.h.in @@ -0,0 +1 @@ +#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}" diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index 5cead76..bbf72a0 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -156,6 +156,12 @@ CONFIGURE_FILE( ${Complex_SOURCE_DIR}/cmTestConfigure.h.in ${Complex_BINARY_DIR}/cmTestConfigure.h) +SET(STRING_WITH_QUOTES "\"hello world\"") +# test CONFIGURE_FILE with ESCAPE_QUOTES on +CONFIGURE_FILE( + ${Complex_SOURCE_DIR}/cmTestConfigureEscape.h.in + ${Complex_BINARY_DIR}/cmTestConfigureEscape.h ESCAPE_QUOTES) + # # Create the libs and the main exe # diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index fb268c4..0b20bfd 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -1,4 +1,5 @@ #include "cmTestConfigure.h" +#include "cmTestConfigureEscape.h" #include "cmVersion.h" #include "ExtraSources/file1.h" #include "file2.h" @@ -678,6 +679,18 @@ int main() { cmFailed("SEPARATE_ARGUMENTS is not working"); } + + // ---------------------------------------------------------------------- + // Test Escape Quotes + if(strcmp("\"hello world\"", STRING_WITH_QUOTES) == 0) + { + cmPassed("ESCAPE_QUOTES is working"); + } + else + { + cmFailed("ESCAPE_QUOTES is not working"); + } + // ---------------------------------------------------------------------- // Summary diff --git a/Tests/ComplexOneConfig/cmTestConfigureEscape.h.in b/Tests/ComplexOneConfig/cmTestConfigureEscape.h.in new file mode 100644 index 0000000..39a8bd6 --- /dev/null +++ b/Tests/ComplexOneConfig/cmTestConfigureEscape.h.in @@ -0,0 +1 @@ +#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}" diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt index 5cead76..bbf72a0 100644 --- a/Tests/ComplexRelativePaths/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/CMakeLists.txt @@ -156,6 +156,12 @@ CONFIGURE_FILE( ${Complex_SOURCE_DIR}/cmTestConfigure.h.in ${Complex_BINARY_DIR}/cmTestConfigure.h) +SET(STRING_WITH_QUOTES "\"hello world\"") +# test CONFIGURE_FILE with ESCAPE_QUOTES on +CONFIGURE_FILE( + ${Complex_SOURCE_DIR}/cmTestConfigureEscape.h.in + ${Complex_BINARY_DIR}/cmTestConfigureEscape.h ESCAPE_QUOTES) + # # Create the libs and the main exe # diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index fb268c4..0b20bfd 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -1,4 +1,5 @@ #include "cmTestConfigure.h" +#include "cmTestConfigureEscape.h" #include "cmVersion.h" #include "ExtraSources/file1.h" #include "file2.h" @@ -678,6 +679,18 @@ int main() { cmFailed("SEPARATE_ARGUMENTS is not working"); } + + // ---------------------------------------------------------------------- + // Test Escape Quotes + if(strcmp("\"hello world\"", STRING_WITH_QUOTES) == 0) + { + cmPassed("ESCAPE_QUOTES is working"); + } + else + { + cmFailed("ESCAPE_QUOTES is not working"); + } + // ---------------------------------------------------------------------- // Summary diff --git a/Tests/ComplexRelativePaths/cmTestConfigureEscape.h.in b/Tests/ComplexRelativePaths/cmTestConfigureEscape.h.in new file mode 100644 index 0000000..39a8bd6 --- /dev/null +++ b/Tests/ComplexRelativePaths/cmTestConfigureEscape.h.in @@ -0,0 +1 @@ +#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}" |