summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmake/testdata
diff options
context:
space:
mode:
authorKeith Isdale <keith.isdale@nokia.com>2009-08-28 02:58:18 (GMT)
committerKeith Isdale <keith.isdale@nokia.com>2009-08-28 02:58:18 (GMT)
commit008d0c69c16b80af6c8c59b8c3a9b6de0238f6d4 (patch)
treeb02dde12fea3d5d09bbdde00b716077d2edcb0d6 /tests/auto/qmake/testdata
parente9274b6cb9bbc71cf9aa7614190e0d3a242fef29 (diff)
downloadQt-008d0c69c16b80af6c8c59b8c3a9b6de0238f6d4.zip
Qt-008d0c69c16b80af6c8c59b8c3a9b6de0238f6d4.tar.gz
Qt-008d0c69c16b80af6c8c59b8c3a9b6de0238f6d4.tar.bz2
Add an autotest for qmake's include function
qmake's include function has been changed in 4.6.x and later to warn,by default, if the specified file does not exist. It is possible to ignore missing .pri files, eg include(SomeOptionalFile.pri, "", true); Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qmake/testdata')
-rw-r--r--tests/auto/qmake/testdata/include_function/existing_file.pri3
-rw-r--r--tests/auto/qmake/testdata/include_function/include_existing_file.pro7
-rw-r--r--tests/auto/qmake/testdata/include_function/include_missing_file.pro3
-rw-r--r--tests/auto/qmake/testdata/include_function/include_missing_file2.pro3
-rw-r--r--tests/auto/qmake/testdata/include_function/main.cpp4
5 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qmake/testdata/include_function/existing_file.pri b/tests/auto/qmake/testdata/include_function/existing_file.pri
new file mode 100644
index 0000000..8b9aaca
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_function/existing_file.pri
@@ -0,0 +1,3 @@
+QT =
+CONFIG = console
+SOURCES = main.cpp
diff --git a/tests/auto/qmake/testdata/include_function/include_existing_file.pro b/tests/auto/qmake/testdata/include_function/include_existing_file.pro
new file mode 100644
index 0000000..424062a
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_function/include_existing_file.pro
@@ -0,0 +1,7 @@
+# Test to see if include(), by default, succeeds when the specific file
+# to include exists
+include(existing_file.pri)
+
+# Test to see if by specifying full set of parameters to include()
+# succeeds when the specified filed to include exists
+include(existing_file.pri, "", false)
diff --git a/tests/auto/qmake/testdata/include_function/include_missing_file.pro b/tests/auto/qmake/testdata/include_function/include_missing_file.pro
new file mode 100644
index 0000000..0b59981
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_function/include_missing_file.pro
@@ -0,0 +1,3 @@
+# Test to see if include(), by default, fails when the specific file
+# to include does not exist
+include(missing_file.pri)
diff --git a/tests/auto/qmake/testdata/include_function/include_missing_file2.pro b/tests/auto/qmake/testdata/include_function/include_missing_file2.pro
new file mode 100644
index 0000000..542b9ff
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_function/include_missing_file2.pro
@@ -0,0 +1,3 @@
+# Specifying full set of parameters to include() to test that a warning
+# is shown for this non-existing file.
+include(missing_file.pri, "", false)
diff --git a/tests/auto/qmake/testdata/include_function/main.cpp b/tests/auto/qmake/testdata/include_function/main.cpp
new file mode 100644
index 0000000..0a8e3d3
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_function/main.cpp
@@ -0,0 +1,4 @@
+int main(int /*argc*/, char ** /*argv*/)
+{
+ return 0;
+}