summaryrefslogtreecommitdiffstats
path: root/Tests/Complex
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-05-23 17:04:00 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-05-23 17:04:00 (GMT)
commit14b07c0973f367352a75550af864b56dc99c3848 (patch)
treec78524be265379c84c4b1658b6d89e737092ef42 /Tests/Complex
parent11d100c94f055f70f478125dace67434a2d1832b (diff)
downloadCMake-14b07c0973f367352a75550af864b56dc99c3848.zip
CMake-14b07c0973f367352a75550af864b56dc99c3848.tar.gz
CMake-14b07c0973f367352a75550af864b56dc99c3848.tar.bz2
add a test for escape quotes and configure file
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/CMakeLists.txt6
-rw-r--r--Tests/Complex/Executable/complex.cxx13
-rw-r--r--Tests/Complex/cmTestConfigureEscape.h.in1
3 files changed, 20 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}"