Patchwork D7431: tests: document behavior of indent() with empty first line

login
register
mail settings
Submitter phabricator
Date Nov. 18, 2019, 4:51 p.m.
Message ID <d03adebe3e2919c9993e68e728f6eb57@localhost.localdomain>
Download mbox | patch
Permalink /patch/43335/
State Not Applicable
Headers show

Comments

phabricator - Nov. 18, 2019, 4:51 p.m.
Closed by commit rHG0fd9e7a1cf36: tests: document behavior of indent() with empty first line (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7431?vs=18164&id=18217

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7431/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7431

AFFECTED FILES
  tests/test-template-functions.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/test-template-functions.t b/tests/test-template-functions.t
--- a/tests/test-template-functions.t
+++ b/tests/test-template-functions.t
@@ -1504,6 +1504,21 @@ 
   
   >> other 3
 
+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
 
   $ hg log -T "{indent(date, '   ')}\n" -r 2:3 -R a