diff options
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")); |