diff options
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" |