Remove sleep()s in Test; Replace with Artificial mtime

This behavior of `touch` is standardized in POSIX, so it should be available.
This commit is contained in:
W. Felix Handte 2021-08-04 15:53:37 -04:00
parent 9cd6c1ff4d
commit a8f4612eab

View File

@ -597,11 +597,10 @@ fi
println "\n===> zstd created file timestamp tests" println "\n===> zstd created file timestamp tests"
datagen > tmp datagen > tmp
sleep 1 # could also use touch -t but I don't know how portable that is. touch -m -t 200001010000.00 tmp
println "test : copy mtime in file -> file compression " println "test : copy mtime in file -> file compression "
zstd -f tmp -o tmp.zst zstd -f tmp -o tmp.zst
assertSameMTime tmp tmp.zst assertSameMTime tmp tmp.zst
sleep 1 # could also use touch -t but I don't know how portable that is.
println "test : copy mtime in file -> file decompression " println "test : copy mtime in file -> file decompression "
zstd -f -d tmp.zst -o tmp.out zstd -f -d tmp.zst -o tmp.out
assertSameMTime tmp.zst tmp.out assertSameMTime tmp.zst tmp.out