Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 31519:3725986b151a
templater: reject bad fillchar argument passed to pad()
Otherwise TypeError would be raised.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 18 Mar 2017 20:38:44 +0900 |
parents | 43d6ef658874 |
children | 6f150bb19317 |
line wrap: on
line diff
--- a/tests/test-command-template.t Sat Mar 18 20:11:15 2017 +0900 +++ b/tests/test-command-template.t Sat Mar 18 20:38:44 2017 +0900 @@ -3521,6 +3521,15 @@ hg: parse error: pad() expects an integer width [255] +Test invalid fillchar passed to pad function + + $ hg log -r 0 -T '{pad(rev, 10, "")}\n' + hg: parse error: pad() expects a single fill character + [255] + $ hg log -r 0 -T '{pad(rev, 10, "--")}\n' + hg: parse error: pad() expects a single fill character + [255] + Test boolean argument passed to pad function no crash