summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-01-02 11:33:52 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-01-02 19:22:33 +0100
commitdbda9f47906864a32c2e17ead60211cf0fb58397 (patch)
treeac2b75c1a247214fdae29cee7ae8a7810f4879ad /tests
parent3a158000fc564675374b6ffd08e4ff0f19901acd (diff)
fix equal signs in semicolon syntax
The following description block was falsely handled as macro assignment. sometarget: ; echo foo=bar Task-number: QTCREATORBUG-7942 Change-Id: I6dfa4b63854388e179bd43c2789012f0be054141 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/makefiles/descriptionblocks.mk1
-rw-r--r--tests/tests.cpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/makefiles/descriptionblocks.mk b/tests/makefiles/descriptionblocks.mk
index 311feb6..c5ff5e9 100644
--- a/tests/makefiles/descriptionblocks.mk
+++ b/tests/makefiles/descriptionblocks.mk
@@ -6,6 +6,7 @@ one: a b $(DEPENDENT_C)
@echo one
two:; @echo two
three : "a;b" ;@echo three; @echo end of three
+four: ; @echo four=4
a :
b :
diff --git a/tests/tests.cpp b/tests/tests.cpp
index d075bb8..220e825 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -400,6 +400,14 @@ void ParserTest::descriptionBlocks()
cmd = target->m_commands.first();
QCOMPARE(cmd.m_commandLine, QLatin1String("echo three; @echo end of three"));
+ target = mkfile->target("four");
+ QVERIFY(target);
+ QCOMPARE(target->m_dependents.count(), 0);
+ QCOMPARE(target->m_commands.count(), 1);
+
+ cmd = target->m_commands.first();
+ QCOMPARE(cmd.m_commandLine, QLatin1String("echo four=4"));
+
target = mkfile->target(".");
QVERIFY(target != 0);
QCOMPARE(target->m_dependents.count(), 0);