aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/jsextensions-file
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-06-08 02:14:29 -0700
committerJake Petroules <jake.petroules@petroules.com>2015-06-10 16:26:16 +0000
commitd5330f3842266989cf5f8cae489a8a3e56cd956e (patch)
tree4dca4cc7d4ce4e4feb0d2a42d779a13a461fcc4a /tests/auto/blackbox/testdata/jsextensions-file
parentb73531b1d29cf52f3891e719bea98a5a29fcba5d (diff)
Add a File.directoryEntries function to list directory contents.
Change-Id: I5470ecfa79d93207858ab661ff8e5e2cf80b75c8 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'tests/auto/blackbox/testdata/jsextensions-file')
-rw-r--r--tests/auto/blackbox/testdata/jsextensions-file/file.qbs7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/blackbox/testdata/jsextensions-file/file.qbs b/tests/auto/blackbox/testdata/jsextensions-file/file.qbs
index 83a5bfae5..146683521 100644
--- a/tests/auto/blackbox/testdata/jsextensions-file/file.qbs
+++ b/tests/auto/blackbox/testdata/jsextensions-file/file.qbs
@@ -35,7 +35,12 @@ Product {
var created = File.makePath(zePath);
if (!created || !File.exists(zePath))
throw new Error("zePath was not created.");
-
+ var entries = File.directoryEntries(product.sourceDirectory, File.AllEntries | File.NoDotAndDotDot);
+ if (entries.length < 3 || !entries.contains("file.qbs"))
+ throw new Error("Directory did not contain file.qbs");
+ entries = File.directoryEntries(product.sourceDirectory, File.Dirs | File.NoDotAndDotDot);
+ if (entries.length < 1 || !entries.contains("zePath"))
+ throw new Error("Directory did not contain only zePath");
};
return [cmd];
}