tests: use `f --newer` instead of `stat -c` in test-fix.t
authorAugie Fackler <augie@google.com>
Wed, 11 Apr 2018 17:24:38 -0400
changeset 37593 314f39e5fa86
parent 37592 fb91757471b5
child 37594 b1f62cd39b5c
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
tests/test-fix.t
--- a/tests/test-fix.t	Wed Apr 11 17:07:07 2018 -0400
+++ b/tests/test-fix.t	Wed Apr 11 17:24:38 2018 -0400
@@ -492,11 +492,11 @@
   $ printf "NO FIX NEEDED\n" > foo.whole
   $ hg add
   adding foo.whole
-  $ OLD_MTIME=`stat -c %Y foo.whole`
-  $ sleep 1 # mtime has a resolution of one second.
+  $ cp foo.whole foo.whole.orig
+  $ sleep 2 # mtime has a resolution of one or two seconds.
   $ hg fix --working-dir
-  $ NEW_MTIME=`stat -c %Y foo.whole`
-  $ test $OLD_MTIME = $NEW_MTIME
+  $ f foo.whole --newer foo.whole.orig
+  foo.whole: older than foo.whole.orig
 
   $ cd ..