diff tests/test-command-template.t @ 37231:05db42732fce

templatefilters: handle TypeError by count() Prepares for removing the weird exception catcher from runfilter().
author Yuya Nishihara <yuya@tcha.org>
date Sun, 18 Mar 2018 16:47:44 +0900
parents 9bcf096a2da2
children 7c902a8345ef
line wrap: on
line diff
--- a/tests/test-command-template.t	Sun Mar 18 17:02:39 2018 +0900
+++ b/tests/test-command-template.t	Sun Mar 18 16:47:44 2018 +0900
@@ -2277,6 +2277,11 @@
   o  0: children: 1, tags: 0, file_adds: 1, ancestors: 1
   
 
+  $ hg log -l1 -T '{termwidth|count}\n'
+  hg: parse error: not countable
+  (template filter 'count' is not compatible with keyword 'termwidth')
+  [255]
+
 Upper/lower filters:
 
   $ hg log -r0 --template '{branch|upper}\n'
@@ -3266,7 +3271,8 @@
 Test laziness of if() then/else clause
 
   $ hg debugtemplate '{count(0)}'
-  abort: incompatible use of template filter 'count'
+  hg: parse error: not countable
+  (incompatible use of template filter 'count')
   [255]
   $ hg debugtemplate '{if(true, "", count(0))}'
   $ hg debugtemplate '{if(false, count(0), "")}'