aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-01-07 13:39:10 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2014-01-07 14:00:32 +0100
commit42422e8e6c4b856e9b81c82e74c70e830177748b (patch)
tree17e8da38172f1ba842ad0267ba21bf8961c38b45 /tests
parent2364c402294a525b2c1d3a8d79bed125f4c6ab88 (diff)
Add function "lastModified" to the "File" JS extension.
Change-Id: I96157cfc5404f53a9f48540952462f1b81f2c4e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/jsextensions/file.qbs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/jsextensions/file.qbs b/tests/auto/blackbox/testdata/jsextensions/file.qbs
index 123665f60..f6b8ebf79 100644
--- a/tests/auto/blackbox/testdata/jsextensions/file.qbs
+++ b/tests/auto/blackbox/testdata/jsextensions/file.qbs
@@ -7,6 +7,10 @@ Product {
var original = new TextFile("original.txt", TextFile.WriteOnly);
original.close();
File.copy("original.txt", "copy.txt");
+ var origTimestamp = File.lastModified("original.txt");
+ var copyTimestamp = File.lastModified("copy.txt");
+ if (origTimestamp > copyTimestamp)
+ throw new Error("Older file has newer timestamp.");
File.remove("original.txt");
var copy = new TextFile("copy.txt", TextFile.WriteOnly);
copy.writeLine(File.exists("original.txt"));