Make status test after record and kwexpand/kwshrink reliable
authorChristian Ebert <blacktrash@gmx.net>
Sat, 10 Sep 2011 13:23:41 +0100
changeset 982 639bb4617c70
parent 981 0b32ba113ad2
child 983 06a1ec674ee8
child 984 a4ea5c2d3ff3
child 986 0f5e2d5e716b
Make status test after record and kwexpand/kwshrink reliable This guarantees test failure when the dirstate code is omitted at the end of the kwtemplater.overwrite method. kwexpand/kwshrink: Without a 1 second wait the test succeeds sometimes, even when the dirstate of the overwritten file is not forced to normal. record: status after recording an added file allows to check whether normallookup is needed after overwriting.
tests/test-keyword.t
--- a/tests/test-keyword.t	Wed Sep 14 15:30:21 2011 +0100
+++ b/tests/test-keyword.t	Sat Sep 10 13:23:41 2011 +0100
@@ -444,6 +444,8 @@
   r
   committed changeset 3:899491280810
   overwriting r expanding keywords
+ - status call required for dirstate.normallookup() check
+  $ hg status r
   $ hg --verbose rollback
   repository tip rolled back to revision 2 (undo commit)
   working directory now based on revision 2
@@ -834,6 +836,8 @@
   $ hg copy a x/a
   $ hg --verbose kwshrink a
   overwriting a shrinking keywords
+ - sleep required for dirstate.normal() check
+  $ sleep 1
   $ hg status a
   $ hg --verbose kwexpand a
   overwriting a expanding keywords