summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-01-23 14:52:28 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-01-24 14:08:05 +0100
commit9f4a104f7145fd122c2b046e15b89478d9117274 (patch)
tree246973f5ebf5b286740e4d282b2aa03126d5fd67 /tests
parent3aa4ddd1a476516c6a9210e5b7420223e5494d58 (diff)
Add tests for !IF in assignment
Task-number: QTCREATORBUG-8621 Change-Id: Ibf3f4a2a6e77f49effd1fb969ef9b207ef4cf7d4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/makefiles/conditionals.mk18
-rw-r--r--tests/tests.cpp5
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/makefiles/conditionals.mk b/tests/makefiles/conditionals.mk
index 800d09e..a783e60 100644
--- a/tests/makefiles/conditionals.mk
+++ b/tests/makefiles/conditionals.mk
@@ -75,5 +75,23 @@ TEST8=false
TEST8=false
!ENDIF
+TEST9=foo \
+bar \
+!IF 1
+baz \
+!ELSE
+boo \
+hoo
+!ENDIF
+
+TEST10=foo \
+bar \
+!IF 0
+baz \
+!ELSE
+boo \
+hoo
+!ENDIF
+
all:
diff --git a/tests/tests.cpp b/tests/tests.cpp
index 97054ab..4d18693 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -302,6 +302,7 @@ void ParserTest::preprocessorInvalidExpressions()
void ParserTest::conditionals()
{
+ QEXPECT_FAIL("", "QTCREATORBUG-8621", Continue);
QVERIFY( openMakefile(QLatin1String("conditionals.mk")) );
QScopedPointer<Makefile> mkfile(m_makefileFactory->makefile());
QVERIFY(mkfile);
@@ -316,6 +317,10 @@ void ParserTest::conditionals()
QCOMPARE(macroTable->macroValue("TEST6"), QLatin1String("true"));
QCOMPARE(macroTable->macroValue("TEST7"), QLatin1String("true"));
QCOMPARE(macroTable->macroValue("TEST8"), QLatin1String("true"));
+ QEXPECT_FAIL("", "QTCREATORBUG-8621", Continue);
+ QCOMPARE(macroTable->macroValue("TEST9"), QLatin1String("foo bar baz"));
+ QEXPECT_FAIL("", "QTCREATORBUG-8621", Continue);
+ QCOMPARE(macroTable->macroValue("TEST10"), QLatin1String("foo bar boo hoo"));
}
void ParserTest::dotDirectives()