--- a/tests/test-command-template.t Mon Jan 04 23:05:09 2016 +0900
+++ b/tests/test-command-template.t Sun Dec 27 17:59:57 2015 +0900
@@ -3542,6 +3542,11 @@
hg: parse error: invalid \x escape
[255]
+json filter should escape HTML tags so that the output can be embedded in hgweb:
+
+ $ hg log -T "{'<foo@example.org>'|json}\n" -R a -l1
+ "\u003cfoo@example.org\u003e"
+
Set up repository for non-ascii encoding tests:
$ hg init nonascii
@@ -3558,11 +3563,12 @@
$ HGENCODING=ascii hg log -T "{branch|json}\n" -r0
"\u00e9"
-json filter should not abort if it can't decode bytes:
-(not sure the current behavior is right; we might want to use utf-8b encoding?)
+json filter takes input as utf-8b:
$ HGENCODING=ascii hg log -T "{'`cat utf-8`'|json}\n" -l1
- "\ufffd\ufffd"
+ "\u00e9"
+ $ HGENCODING=ascii hg log -T "{'`cat latin1`'|json}\n" -l1
+ "\udce9"
utf8 filter: