comparison tests/test-command-template.t @ 28687:29c249dfb4ef

templater: do not strip non-quote characters from template config Before this patch, the first and last characters were stripped from ui.logtemplate and template.* if they were the same. It could lead to a strange result as quotes are optional. See the test for example.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 27 Mar 2016 17:42:19 +0900
parents ed1d90f6e921
children cc103bd0dbf9
comparison
equal deleted inserted replaced
28686:b212e01fead0 28687:29c249dfb4ef
69 8 69 8
70 $ hg tip --config "ui.logtemplate='{rev}\n'" 70 $ hg tip --config "ui.logtemplate='{rev}\n'"
71 8 71 8
72 $ hg tip --config 'ui.logtemplate="{rev}\n"' 72 $ hg tip --config 'ui.logtemplate="{rev}\n"'
73 8 73 8
74 $ hg tip --config 'ui.logtemplate=n{rev}\n'
75 n8
74 76
75 Make sure user/global hgrc does not affect tests 77 Make sure user/global hgrc does not affect tests
76 78
77 $ echo '[ui]' > .hg/hgrc 79 $ echo '[ui]' > .hg/hgrc
78 $ echo 'logtemplate =' >> .hg/hgrc 80 $ echo 'logtemplate =' >> .hg/hgrc