tests/test-commit-interactive.t
branchstable
changeset 29180 8c5e880c7e25
parent 29154 9d38a2061fd8
child 30157 df224038c516
--- a/tests/test-commit-interactive.t	Mon May 16 17:21:25 2016 -0500
+++ b/tests/test-commit-interactive.t	Sat May 21 02:48:51 2016 +0900
@@ -895,11 +895,24 @@
   $ LANGUAGE=ja
   $ export LANGUAGE
 
-  $ hg commit -i --encoding cp932 2>&1 <<EOF | grep '^y - '
+  $ cat > $TESTTMP/escape.py <<EOF
+  > from __future__ import absolute_import
+  > import sys
+  > def escape(c):
+  >     o = ord(c)
+  >     if o < 0x80:
+  >         return c
+  >     else:
+  >         return r'\x%02x' % o # escape char setting MSB
+  > for l in sys.stdin:
+  >     sys.stdout.write(''.join(escape(c) for c in l))
+  > EOF
+
+  $ hg commit -i --encoding cp932 2>&1 <<EOF | python $TESTTMP/escape.py | grep '^y - '
   > ?
   > q
   > EOF
-  y - \x82\xb1\x82\xcc\x95\xcf\x8dX\x82\xf0\x8bL\x98^(yes) (esc)
+  y - \x82\xb1\x82\xcc\x95\xcf\x8dX\x82\xf0\x8bL\x98^(yes)
 
   $ LANGUAGE=
 #endif