diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-01-07 13:39:10 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-01-07 14:00:32 +0100 |
commit | 42422e8e6c4b856e9b81c82e74c70e830177748b (patch) | |
tree | 17e8da38172f1ba842ad0267ba21bf8961c38b45 /tests/auto/blackbox | |
parent | 2364c402294a525b2c1d3a8d79bed125f4c6ab88 (diff) | |
download | qbs-42422e8e6c4b856e9b81c82e74c70e830177748b.tar.gz |
Add function "lastModified" to the "File" JS extension.
Change-Id: I96157cfc5404f53a9f48540952462f1b81f2c4e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/blackbox')
-rw-r--r-- | tests/auto/blackbox/testdata/jsextensions/file.qbs | 4 |
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")); |