amend: in tests, do not rely on defaults -- always use explicit -d
authorGreg Ward <greg@gerg.ca>
Thu, 05 Jun 2014 21:27:06 -0400
changeset 974 5808aad40aca
parent 972 f889409bdcc3
child 975 09d6036ad596
amend: in tests, do not rely on defaults -- always use explicit -d Having a default -d option will make it hard to test -D/--current-date, which is coming shortly: presence of -d overrides -D, just like with mq's qrefresh.
tests/test-amend.t
--- a/tests/test-amend.t	Tue Jun 03 16:45:02 2014 -0700
+++ b/tests/test-amend.t	Thu Jun 05 21:27:06 2014 -0400
@@ -1,6 +1,4 @@
   $ cat >> $HGRCPATH <<EOF
-  > [defaults]
-  > amend=-d "0 0"
   > [extensions]
   > hgext.rebase=
   > hgext.graphlog=
@@ -22,7 +20,7 @@
   $ hg branch foo
   marked working directory as branch foo
   (branches are permanent and global, did you want a bookmark?)
-  $ hg amend
+  $ hg amend -d '0 0'
   $ hg debugobsolete
   07f4944404050f47db2e5c5071e0e84e7a27bba9 6a022cbb61d5ba0f03f98ff2d36319dfea1034ae 0 {'date': '* *', 'user': 'test'} (glob)
   b2e32ffb533cbe1d5759638c0cd4e8abc43b2738 0 {'date': '* *', 'user': 'test'} (glob)
@@ -35,7 +33,7 @@
   
 Test no-op
 
-  $ hg amend
+  $ hg amend -d '0 0'
   nothing changed
   [1]
   $ glog
@@ -44,7 +42,7 @@
 
 Test forcing the message to the same value, no intermediate revision.
 
-  $ hg amend -m 'adda'
+  $ hg amend -d '0 0' -m 'adda'
   nothing changed
   [1]
   $ glog