From 984cd4d8fd361e89ac5b8a514b8088bb53b925f6 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Mon, 31 Jan 2011 10:21:01 -0300 Subject: Fixed the project file test to work with win32 paths. Reviewed by Hugo Parente Reviewed by Luciano Wolf --- tests/test_generator/dummygentest.cpp | 6 ++++-- tests/test_generator/dummygentestconfig.h.in | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_generator/dummygentest.cpp b/tests/test_generator/dummygentest.cpp index 3261a3cac..83f3c9263 100644 --- a/tests/test_generator/dummygentest.cpp +++ b/tests/test_generator/dummygentest.cpp @@ -115,14 +115,16 @@ void DummyGenTest::testProjectFileArgumentsReading() QCOMPARE(logContents[3], QString("generator-set = dummy")); QVERIFY(logContents[4].startsWith("header-file = ")); QVERIFY(logContents[4].endsWith("test_global.h")); - QCOMPARE(logContents[5], QString("include-paths = /include/path/location1:/include/path/location2")); + QCOMPARE(logContents[5], + QDir::toNativeSeparators(QString("include-paths = /include/path/location1%1/include/path/location2").arg(PATH_SPLITTER))); QCOMPARE(logContents[6], QString("no-suppress-warnings")); QCOMPARE(logContents[7], QString("output-directory = /tmp/output")); QVERIFY(logContents[8].startsWith("project-file = ")); QVERIFY(logContents[8].endsWith("dummygentest-project.txt")); QVERIFY(logContents[9].startsWith("typesystem-file = ")); QVERIFY(logContents[9].endsWith("test_typesystem.xml")); - QCOMPARE(logContents[10], QString("typesystem-paths = /typesystem/path/location1:/typesystem/path/location2")); + QCOMPARE(logContents[10], + QDir::toNativeSeparators(QString("typesystem-paths = /typesystem/path/location1%1/typesystem/path/location2").arg(PATH_SPLITTER))); } QTEST_APPLESS_MAIN(DummyGenTest) diff --git a/tests/test_generator/dummygentestconfig.h.in b/tests/test_generator/dummygentestconfig.h.in index e472804dc..9da17dcd3 100644 --- a/tests/test_generator/dummygentestconfig.h.in +++ b/tests/test_generator/dummygentestconfig.h.in @@ -5,5 +5,11 @@ #define DUMMYGENERATOR_BINARY "@DUMMYGENERATOR_EXECUTABLE@" #define DUMMYGENERATOR_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@" +#ifdef _WINDOWS + #define PATH_SPLITTER ";" +#else + #define PATH_SPLITTER ":" +#endif + #endif // DUMMYGENTESTCONFIG_H -- cgit v1.2.3