diff tests/test-command-template.t @ 38299:88e7105b5cd9

templater: restore the original string format of {date} Unfortunately, python-hglib relies on that. I could fix python-hglib, but there would be other tools that take a decimal separator as the separator of unixtime and tzoffset. The showfmt is set per instance since new code uses '%d %d' format by default.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 13 Jun 2018 21:57:24 +0900
parents f9c426385853
children d4fae9a0ab1f
line wrap: on
line diff
--- a/tests/test-command-template.t	Tue Jun 12 20:43:56 2018 -0400
+++ b/tests/test-command-template.t	Wed Jun 13 21:57:24 2018 +0900
@@ -1548,33 +1548,33 @@
   branches--debug: 
   branches--debug: 
   branches--debug: 
-  date: 1577872860 0
-  date: 1000000 0
-  date: 1500001 0
-  date: 1500000 0
-  date: 1400000 0
-  date: 1300000 0
-  date: 1200000 0
-  date: 1100000 0
-  date: 1000000 0
-  date--verbose: 1577872860 0
-  date--verbose: 1000000 0
-  date--verbose: 1500001 0
-  date--verbose: 1500000 0
-  date--verbose: 1400000 0
-  date--verbose: 1300000 0
-  date--verbose: 1200000 0
-  date--verbose: 1100000 0
-  date--verbose: 1000000 0
-  date--debug: 1577872860 0
-  date--debug: 1000000 0
-  date--debug: 1500001 0
-  date--debug: 1500000 0
-  date--debug: 1400000 0
-  date--debug: 1300000 0
-  date--debug: 1200000 0
-  date--debug: 1100000 0
-  date--debug: 1000000 0
+  date: 1577872860.00
+  date: 1000000.00
+  date: 1500001.00
+  date: 1500000.00
+  date: 1400000.00
+  date: 1300000.00
+  date: 1200000.00
+  date: 1100000.00
+  date: 1000000.00
+  date--verbose: 1577872860.00
+  date--verbose: 1000000.00
+  date--verbose: 1500001.00
+  date--verbose: 1500000.00
+  date--verbose: 1400000.00
+  date--verbose: 1300000.00
+  date--verbose: 1200000.00
+  date--verbose: 1100000.00
+  date--verbose: 1000000.00
+  date--debug: 1577872860.00
+  date--debug: 1000000.00
+  date--debug: 1500001.00
+  date--debug: 1500000.00
+  date--debug: 1400000.00
+  date--debug: 1300000.00
+  date--debug: 1200000.00
+  date--debug: 1100000.00
+  date--debug: 1000000.00
   desc: third
   desc: second
   desc: merge
@@ -2291,7 +2291,7 @@
   $ hg log -r0 --template '{author|lower}\n'
   user name <user@hostname>
   $ hg log -r0 --template '{date|upper}\n'
-  1000000 0
+  1000000.00
 
 Add a commit that does all possible modifications at once
 
@@ -2806,9 +2806,9 @@
 Behind the scenes, this would throw TypeError without intype=bytes
 
   $ hg log -l 3 --template '{date|obfuscate}\n'
-  &#48;&#32;&#48;
-  &#48;&#32;&#48;
-  &#49;&#53;&#55;&#55;&#56;&#55;&#50;&#56;&#54;&#48;&#32;&#48;
+  &#48;&#46;&#48;&#48;
+  &#48;&#46;&#48;&#48;
+  &#49;&#53;&#55;&#55;&#56;&#55;&#50;&#56;&#54;&#48;&#46;&#48;&#48;
 
 Behind the scenes, this will throw a ValueError
 
@@ -2820,9 +2820,9 @@
 Behind the scenes, this would throw AttributeError without intype=bytes
 
   $ hg log -l 3 --template 'line: {date|escape}\n'
-  line: 0 0
-  line: 0 0
-  line: 1577872860 0
+  line: 0.00
+  line: 0.00
+  line: 1577872860.00
 
   $ hg log -l 3 --template 'line: {extras|localdate}\n'
   hg: parse error: localdate expects a date information
@@ -4625,8 +4625,8 @@
 Test with non-strings like dates
 
   $ hg log -T "{indent(date, '   ')}\n" -r 2:3 -R a
-     1200000 0
-     1300000 0
+     1200000.00
+     1300000.00
 
 Test broken string escapes: