diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-11-19 16:05:03 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-11-19 16:07:02 +0100 |
commit | 2e3d9971dddff7f14997ce32d5c28968b70d10ca (patch) | |
tree | 0a3b653d6fe3f417bdb47b3b436fabdaf5c5acbd /tests | |
parent | 12dd1f527a320f38e3d7c8f6f3e47137b49dc694 (diff) |
fix non-functional set command in command blocks
Change-Id: I277a29ffd9ad28f8e988f21114c9152c5845ff92
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/makefiles/blackbox/environmentVariablesInCommands/test.mk | 3 | ||||
-rw-r--r-- | tests/tests.cpp | 9 | ||||
-rw-r--r-- | tests/tests.h | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/makefiles/blackbox/environmentVariablesInCommands/test.mk b/tests/makefiles/blackbox/environmentVariablesInCommands/test.mk new file mode 100644 index 0000000..e1c2d13 --- /dev/null +++ b/tests/makefiles/blackbox/environmentVariablesInCommands/test.mk @@ -0,0 +1,3 @@ +first: + set SOME_VARIABLE=narf + cmd.exe /c echo %%SOME_VARIABLE%% diff --git a/tests/tests.cpp b/tests/tests.cpp index 76d0791..4d14bae 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -1045,6 +1045,15 @@ void ParserTest::environmentVariables() m_bResetJomProcessEnvironment = false; } +void ParserTest::environmentVariablesInCommands() +{ + QVERIFY(runJom(QStringList() << "/f" << "test.mk" << "/sl", + "blackbox/environmentVariablesInCommands")); + QCOMPARE(m_jomProcess->exitCode(), 0); + QByteArray output = m_jomProcess->readAllStandardOutput().trimmed(); + QCOMPARE(output.data(), "narf"); +} + void ParserTest::ignoreExitCodes() { QVERIFY(runJom(QStringList() << "/f" << "blackbox\\ignoreExitCodes\\test.mk")); diff --git a/tests/tests.h b/tests/tests.h index be77426..45e9455 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -67,6 +67,7 @@ private slots: void caseInsensitiveDependents(); void environmentVariables_data(); void environmentVariables(); + void environmentVariablesInCommands(); void ignoreExitCodes(); void inlineFiles(); void unicodeFiles_data(); |