summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmake/testdata/func_variables
diff options
context:
space:
mode:
authorJo Asplin <jo.asplin@nokia.com>2011-09-12 09:21:12 +0200
committerJo Asplin <jo.asplin@nokia.com>2011-09-12 10:08:29 +0200
commit4c43b60323e88befb08504c1ec67305cc8f57e70 (patch)
treef63216a07d69701e791839d7a9938337792eaf73 /tests/auto/tools/qmake/testdata/func_variables
parent3ade4d260f3afe160bd593e27e18f1dffdbee398 (diff)
Moved autotests in category 'tools' into new directory structure
Task-number: QTBUG-21355 Change-Id: I315d4b1f55d42391524c0e8625952dee1b96fca3 Reviewed-on: http://codereview.qt-project.org/4449 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/tools/qmake/testdata/func_variables')
-rw-r--r--tests/auto/tools/qmake/testdata/func_variables/func_variables.pro52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/auto/tools/qmake/testdata/func_variables/func_variables.pro b/tests/auto/tools/qmake/testdata/func_variables/func_variables.pro
new file mode 100644
index 0000000000..9b786f7eda
--- /dev/null
+++ b/tests/auto/tools/qmake/testdata/func_variables/func_variables.pro
@@ -0,0 +1,52 @@
+defineTest(testVariable) {
+ varname=$$1
+ value=$$eval($$varname)
+ RESULT=$$value
+ export(RESULT)
+}
+
+defineTest(callTest) {
+ myvar=$$1
+ testVariable(myvar)
+}
+
+defineTest(callTestExport) {
+ myvar=$$1
+ export(myvar)
+ testVariable(myvar)
+}
+
+defineTest(callTestExportChange) {
+ myvar=foo
+ export(myvar)
+ myvar=$$1
+ testVariable(myvar)
+}
+
+value=direct
+myvar=$$value
+testVariable(myvar)
+!isEqual(RESULT,$$value) {
+ message( "FAILED: result [$$RESULT] != $$value" )
+}
+
+value=export
+callTestExport($$value)
+!isEqual(RESULT,$$value) {
+ message( "FAILED: result [$$RESULT] != $$value" )
+}
+
+value=export_and_change
+callTestExportChange($$value)
+!isEqual(RESULT,$$value) {
+ message( "FAILED: result [$$RESULT] != $$value" )
+}
+
+value=local
+callTest($$value)
+!isEqual(RESULT,$$value) {
+ message( "FAILED: result [$$RESULT] != $$value" )
+}
+
+
+