tests: don't use dates before epoch in test-keyword.t
authorMads Kiilerich <mads@kiilerich.com>
Wed, 04 Jul 2012 02:04:58 +0200
changeset 17098 09305d7745dd
parent 17097 885542e7d9b6
child 17099 1c55d1add24f
tests: don't use dates before epoch in test-keyword.t Timezone offsets of less than a minute is not shown but can cause displayed dates to be before epoch start - and dates before epoch start is not shown correctly on Windows (see also 4d5b12a5517b). These 'negative' dates could be considered undefined behaviour so we don't care and swap the tests values for timestamp and timezone.
tests/test-keyword.t
--- a/tests/test-keyword.t	Wed Jul 04 01:45:28 2012 +0200
+++ b/tests/test-keyword.t	Wed Jul 04 02:04:58 2012 +0200
@@ -334,7 +334,7 @@
   >>> lines.insert(1, 'foo\n')
   >>> lines.append('bar\n')
   >>> open('a', 'w').writelines(lines)
-  $ hg record -d '1 10' -m rectest a<<EOF
+  $ hg record -d '10 1' -m rectest a<<EOF
   > y
   > y
   > n
@@ -355,7 +355,7 @@
   record change 2/2 to 'a'? [Ynesfdaq?] 
 
   $ hg identify
-  d17e03c92c97+ tip
+  5f5eb23505c3+ tip
   $ hg status
   M a
   A r
@@ -363,7 +363,7 @@
 Cat modified file a
 
   $ cat a
-  expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
+  expand $Id: a,v 5f5eb23505c3 1970/01/01 00:00:10 test $
   foo
   do not process $Id:
   xxx $
@@ -372,8 +372,8 @@
 Diff remaining chunk
 
   $ hg diff a
-  diff -r d17e03c92c97 a
-  --- a/a	Wed Dec 31 23:59:51 1969 -0000
+  diff -r 5f5eb23505c3 a
+  --- a/a	Thu Jan 01 00:00:09 1970 -0000
   +++ b/a	* (glob)
   @@ -2,3 +2,4 @@
    foo
@@ -391,7 +391,7 @@
 
  - do not use "hg record -m" here!
 
-  $ hg record -l msg -d '1 11' a<<EOF
+  $ hg record -l msg -d '11 1' a<<EOF
   > y
   > y
   > y
@@ -419,7 +419,7 @@
 rollback and revert expansion
 
   $ cat a
-  expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
+  expand $Id: a,v 78e0a02d76aa 1970/01/01 00:00:11 test $
   foo
   do not process $Id:
   xxx $
@@ -460,14 +460,14 @@
 
 record added file alone
 
-  $ hg -v record -l msg -d '1 12' r<<EOF
+  $ hg -v record -l msg -d '12 2' r<<EOF
   > y
   > EOF
   diff --git a/r b/r
   new file mode 100644
   examine changes to 'r'? [Ynesfdaq?] 
   r
-  committed changeset 3:899491280810
+  committed changeset 3:82a2f715724d
   overwriting r expanding keywords
  - status call required for dirstate.normallookup() check
   $ hg status r
@@ -484,14 +484,14 @@
 
   $ echo '$Id$' > i
   $ hg add i
-  $ hg --verbose record -d '1 13' -m recignored<<EOF
+  $ hg --verbose record -d '13 1' -m recignored<<EOF
   > y
   > EOF
   diff --git a/i b/i
   new file mode 100644
   examine changes to 'i'? [Ynesfdaq?] 
   i
-  committed changeset 3:5f40fe93bbdc
+  committed changeset 3:9f40ceb5a072
   $ cat i
   $Id$
   $ hg -q rollback
@@ -502,14 +502,14 @@
 
   $ echo amend >> a
   $ echo amend >> b
-  $ hg -q commit -d '1 14' -m 'prepare amend'
+  $ hg -q commit -d '14 1' -m 'prepare amend'
 
-  $ hg --debug commit --amend -d '1 15' -m 'amend without changes' | grep keywords
+  $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords
   overwriting a expanding keywords
   $ hg -q id
-  a71343332ea9
+  577e60613a88
   $ head -1 a
-  expand $Id: a,v a71343332ea9 1970/01/01 00:00:01 test $
+  expand $Id: a,v 577e60613a88 1970/01/01 00:00:15 test $
 
   $ hg -q strip -n tip