diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-11-11 11:40:24 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-12-13 18:56:20 +0000 |
commit | b6b44b368c6fc2df168195eaee57a2f925a29646 (patch) | |
tree | d7768d5a0f89bd9a63e6d19e4046ce994b58c696 /tests/auto/tools/qmakelib/evaltest.cpp | |
parent | 169a40d511165f6c3c9a71cd5c079786c22d2aca (diff) |
qmake: introduce magic bypassNesting() scope
will be needed by configure.
Change-Id: If14e6944fe84767bd67604ecde98076f873749ef
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/tools/qmakelib/evaltest.cpp')
-rw-r--r-- | tests/auto/tools/qmakelib/evaltest.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp index e3be294e5f..4e215b8570 100644 --- a/tests/auto/tools/qmakelib/evaltest.cpp +++ b/tests/auto/tools/qmakelib/evaltest.cpp @@ -633,6 +633,31 @@ void tst_qmakelib::addControlStructs() << "" << true; + QTest::newRow("bypassNesting()") + << "defineTest(func) {\n" + "LOCAL = 1\n" + "bypassNesting() {\n" + "OUT = 1\n" + "!isEmpty(GLOBAL): OUT1 = 1\n" + "!isEmpty(LOCAL): OUT2 = 1\n" + "}\n" + "}\n" + "GLOBAL = 1\n" + "func()" + << "GLOBAL = 1\nLOCAL = UNDEF\nOUT = 1\nOUT1 = 1\nOUT2 = UNDEF" + << "" + << true; + + QTest::newRow("error() from bypassNesting()") + << "defineTest(func) {\n" + "bypassNesting() { error(error) }\n" + "}\n" + "func()\n" + "OKE = 1" + << "OKE = UNDEF" + << "Project ERROR: error" + << false; + QTest::newRow("top-level return()") << "VAR = good\nreturn()\nVAR = bad" << "VAR = good" |