aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/path-probe/BaseApp.qbs2
-rw-r--r--tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs12
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp1
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/path-probe/BaseApp.qbs b/tests/auto/blackbox/testdata/path-probe/BaseApp.qbs
index 944a95a93..84c00c240 100644
--- a/tests/auto/blackbox/testdata/path-probe/BaseApp.qbs
+++ b/tests/auto/blackbox/testdata/path-probe/BaseApp.qbs
@@ -37,6 +37,7 @@ CppApplication {
property varList inputNameSuffixes
property pathList inputSearchPaths
property var inputNameFilter
+ property var inputCandidateFilter
property stringList outputFilePaths
@@ -46,6 +47,7 @@ CppApplication {
names: inputNames
nameSuffixes: inputNameSuffixes
nameFilter: inputNameFilter
+ candidateFilter: inputCandidateFilter
searchPaths: inputSearchPaths
}
diff --git a/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs b/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs
new file mode 100644
index 000000000..a65256a68
--- /dev/null
+++ b/tests/auto/blackbox/testdata/path-probe/candidate-filter.qbs
@@ -0,0 +1,12 @@
+import qbs.FileInfo
+
+BaseApp {
+ inputNames: ["tool.1", "tool.2"]
+ inputSearchPaths: "bin"
+ outputFilePaths: ["bin/tool.2"]
+ inputCandidateFilter: {
+ return function(f) {
+ return FileInfo.fileName(f) == "tool.2";
+ }
+ }
+}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index c6acffcc9..534922112 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -2735,6 +2735,7 @@ void TestBlackbox::pathProbe_data()
QTest::newRow("mult-files-suffixes") << QString("mult-files-suffixes.qbs") << true;
QTest::newRow("mult-files-mult-suffixes") << QString("mult-files-mult-suffixes.qbs") << true;
QTest::newRow("name-filter") << QString("name-filter.qbs") << true;
+ QTest::newRow("candidate-filter") << QString("candidate-filter.qbs") << true;
}
void TestBlackbox::pathProbe()