tests/test-hgweb-json.t
changeset 35148 d2eff9d4db3f
parent 35045 b0262b25ab48
child 35389 b963750b125f
--- a/tests/test-hgweb-json.t	Wed Nov 29 07:57:17 2017 +0530
+++ b/tests/test-hgweb-json.t	Thu Nov 30 16:30:43 2017 +0800
@@ -1648,3 +1648,28 @@
     "rawdoc": "Working with Phases\n*", (glob)
     "topic": "phases"
   }
+
+Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
+
+  $ echo foo >> da/foo
+  $ HGENCODING=cp932 hg ci -m `$PYTHON -c 'print("\x94\x5c")'`
+
+Commit message with null character
+
+  $ echo foo >> da/foo
+  >>> open('msg', 'wb').write('commit with null character: \0\n')
+  $ hg ci -l msg
+  $ rm msg
+
+Stop and restart with HGENCODING=cp932
+
+  $ killdaemons.py
+  $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
+  > -A access.log -E error.log
+  $ cat hg.pid >> $DAEMON_PIDS
+
+Test json escape of multibyte characters
+
+  $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
+        "desc": "commit with null character: \u0000",
+        "desc": "\u80fd",