diff tests/test-command-template.t @ 35594:468d7a1f6633

revsetlang: catch invalid value passed to formatspec() The scope of AttributeError is narrowed because it's more likely to be triggered by mistake.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 01 Apr 2017 17:44:07 +0900
parents 850cd045b1df
children 077ee15b8493
line wrap: on
line diff
--- a/tests/test-command-template.t	Sat Apr 01 17:28:28 2017 +0900
+++ b/tests/test-command-template.t	Sat Apr 01 17:44:07 2017 +0900
@@ -4103,6 +4103,24 @@
   $ hg log -T '{revset("%l", 0)}\n'
   hg: parse error: incomplete revspec format character
   [255]
+  $ hg log -T '{revset("%d", 'foo')}\n'
+  hg: parse error: invalid argument for revspec
+  [255]
+  $ hg log -T '{revset("%ld", files)}\n'
+  hg: parse error: invalid argument for revspec
+  [255]
+  $ hg log -T '{revset("%ls", 0)}\n'
+  hg: parse error: invalid argument for revspec
+  [255]
+  $ hg log -T '{revset("%b", 'foo')}\n'
+  hg: parse error: invalid argument for revspec
+  [255]
+  $ hg log -T '{revset("%lb", files)}\n'
+  hg: parse error: invalid argument for revspec
+  [255]
+  $ hg log -T '{revset("%r", 0)}\n'
+  hg: parse error: invalid argument for revspec
+  [255]
 
 Test files function