mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 03:59:58 +00:00
add a test for escape quotes and configure file
This commit is contained in:
parent
11d100c94f
commit
14b07c0973
@ -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
|
||||
#
|
||||
|
@ -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
|
||||
|
||||
|
1
Tests/Complex/cmTestConfigureEscape.h.in
Normal file
1
Tests/Complex/cmTestConfigureEscape.h.in
Normal file
@ -0,0 +1 @@
|
||||
#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}"
|
@ -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
|
||||
#
|
||||
|
@ -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
|
||||
|
||||
|
1
Tests/ComplexOneConfig/cmTestConfigureEscape.h.in
Normal file
1
Tests/ComplexOneConfig/cmTestConfigureEscape.h.in
Normal file
@ -0,0 +1 @@
|
||||
#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}"
|
@ -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
|
||||
#
|
||||
|
@ -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
|
||||
|
||||
|
1
Tests/ComplexRelativePaths/cmTestConfigureEscape.h.in
Normal file
1
Tests/ComplexRelativePaths/cmTestConfigureEscape.h.in
Normal file
@ -0,0 +1 @@
|
||||
#define STRING_WITH_QUOTES "${STRING_WITH_QUOTES}"
|
Loading…
Reference in New Issue
Block a user