add a test for escape quotes and configure file

This commit is contained in:
Bill Hoffman 2002-05-23 13:04:00 -04:00
parent 11d100c94f
commit 14b07c0973
9 changed files with 60 additions and 0 deletions

View File

@ -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
#

View File

@ -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

View File

@ -0,0 +1 @@
#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}"

View File

@ -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
#

View File

@ -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

View File

@ -0,0 +1 @@
#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}"

View File

@ -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
#

View File

@ -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

View File

@ -0,0 +1 @@
#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}"