diff options
Diffstat (limited to 'avx512-0037785/tests/test/units/sysutils/tfileage.pp')
-rw-r--r-- | avx512-0037785/tests/test/units/sysutils/tfileage.pp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/avx512-0037785/tests/test/units/sysutils/tfileage.pp b/avx512-0037785/tests/test/units/sysutils/tfileage.pp new file mode 100644 index 0000000000..7710082ea6 --- /dev/null +++ b/avx512-0037785/tests/test/units/sysutils/tfileage.pp @@ -0,0 +1,18 @@ +uses + sysutils; +begin + if 3600*24*(now()-FileDateToDateTime(FileAge(paramstr(0))))>7200 then + begin + writeln('FileAge returns: ',FileDateToDateTime(FileAge(paramstr(0)))); + writeln('Compilation time and run time differ too much, SysUtils.FileAge buggy?'); + halt(1); + end; + + { test with relative path } + if 3600*24*(now()-FileDateToDateTime(FileAge(ExtractRelativePath(GetCurrentDir+DirectorySeparator,paramstr(0)))))>7200 then + begin + writeln('FileAge returns: ',FileDateToDateTime(FileAge(paramstr(0)))); + writeln('Compilation time and run time differ too much, SysUtils.FileAge buggy?'); + halt(1); + end; +end. |