diff tests/test-template-functions.t @ 43695:fa246ada356b

templates: make {indent("", " ")} be empty indent() is documented to indent all non-empty lines, but it made an exception for the first line, which always got indented. I also made indent() not indent the first line even if an indent override was given for the first line. I think that is what one would usually want. Differential Revision: https://phab.mercurial-scm.org/D7432
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 15 Nov 2019 10:16:27 -0800
parents 0fd9e7a1cf36
children 482a6aac1f15
line wrap: on
line diff
--- a/tests/test-template-functions.t	Fri Nov 15 10:16:22 2019 -0800
+++ b/tests/test-template-functions.t	Fri Nov 15 10:16:27 2019 -0800
@@ -1507,16 +1507,16 @@
 Test indent with empty first line
 
   $ hg version -T "{indent('', '>> ')}\n"
-  >> 
+  
 
   $ hg version -T "{indent('
   > second', '>> ')}\n"
-  >> 
+  
   >> second
 
   $ hg version -T "{indent('
   > second', '>> ', ' > ')}\n"
-   > 
+  
   >> second
 
 Test with non-strings like dates