comparison tests/test-fix.t @ 37593:314f39e5fa86

tests: use `f --newer` instead of `stat -c` in test-fix.t Also increase sleep to two seconds so this test will likely pass on FAT32. Differential Revision: https://phab.mercurial-scm.org/D3252
author Augie Fackler <augie@google.com>
date Wed, 11 Apr 2018 17:24:38 -0400
parents 41ba336d9f1e
children e2506748b47f
comparison
equal deleted inserted replaced
37592:fb91757471b5 37593:314f39e5fa86
490 $ cd donttouchunfixedfiles 490 $ cd donttouchunfixedfiles
491 491
492 $ printf "NO FIX NEEDED\n" > foo.whole 492 $ printf "NO FIX NEEDED\n" > foo.whole
493 $ hg add 493 $ hg add
494 adding foo.whole 494 adding foo.whole
495 $ OLD_MTIME=`stat -c %Y foo.whole` 495 $ cp foo.whole foo.whole.orig
496 $ sleep 1 # mtime has a resolution of one second. 496 $ sleep 2 # mtime has a resolution of one or two seconds.
497 $ hg fix --working-dir 497 $ hg fix --working-dir
498 $ NEW_MTIME=`stat -c %Y foo.whole` 498 $ f foo.whole --newer foo.whole.orig
499 $ test $OLD_MTIME = $NEW_MTIME 499 foo.whole: older than foo.whole.orig
500 500
501 $ cd .. 501 $ cd ..
502 502
503 When a fixer prints to stderr, we assume that it has failed. We should show the 503 When a fixer prints to stderr, we assume that it has failed. We should show the
504 error messages to the user, and we should not let the failing fixer affect the 504 error messages to the user, and we should not let the failing fixer affect the