Show More
@@ -165,6 +165,7 b' test-empty-file.t' | |||||
165 | test-empty-group.t |
|
165 | test-empty-group.t | |
166 | test-empty.t |
|
166 | test-empty.t | |
167 | test-encode.t |
|
167 | test-encode.t | |
|
168 | test-encoding-align.t | |||
168 | test-encoding-func.py |
|
169 | test-encoding-func.py | |
169 | test-encoding-textwrap.t |
|
170 | test-encoding-textwrap.t | |
170 | test-encoding.t |
|
171 | test-encoding.t |
@@ -5,6 +5,7 b' Test alignment of multibyte characters' | |||||
5 | $ hg init t |
|
5 | $ hg init t | |
6 | $ cd t |
|
6 | $ cd t | |
7 | $ "$PYTHON" << EOF |
|
7 | $ "$PYTHON" << EOF | |
|
8 | > from mercurial import pycompat | |||
8 |
> # |
|
9 | > # (byte, width) = (6, 4) | |
9 | > s = b"\xe7\x9f\xad\xe5\x90\x8d" |
|
10 | > s = b"\xe7\x9f\xad\xe5\x90\x8d" | |
10 | > # (byte, width) = (7, 7): odd width is good for alignment test |
|
11 | > # (byte, width) = (7, 7): odd width is good for alignment test | |
@@ -21,14 +22,17 b' Test alignment of multibyte characters' | |||||
21 | > command = registrar.command(cmdtable) |
|
22 | > command = registrar.command(cmdtable) | |
22 | > |
|
23 | > | |
23 | > @command(b'showoptlist', |
|
24 | > @command(b'showoptlist', | |
24 |
> [('s', 'opt1', '', 'short width' + |
|
25 | > [(b's', b'opt1', b'', b'short width' + (b' ' +%(s)s) * 8, %(s)s), | |
25 |
> ('m', 'opt2', '', 'middle width' + |
|
26 | > (b'm', b'opt2', b'', b'middle width' + (b' ' + %(m)s) * 8, %(m)s), | |
26 |
> ('l', 'opt3', '', 'long width' + |
|
27 | > (b'l', b'opt3', b'', b'long width' + (b' ' + %(l)s) * 8, %(l)s)], | |
27 | > '') |
|
28 | > b'') | |
28 | > def showoptlist(ui, repo, *pats, **opts): |
|
29 | > def showoptlist(ui, repo, *pats, **opts): | |
29 | > '''dummy command to show option descriptions''' |
|
30 | > '''dummy command to show option descriptions''' | |
30 | > return 0 |
|
31 | > return 0 | |
31 | > """ % globals()) |
|
32 | > """ % {b's': pycompat.byterepr(s), | |
|
33 | > b'm': pycompat.byterepr(m), | |||
|
34 | > b'l': pycompat.byterepr(l), | |||
|
35 | > }) | |||
32 | > f.close() |
|
36 | > f.close() | |
33 | > EOF |
|
37 | > EOF | |
34 | $ S=`cat s` |
|
38 | $ S=`cat s` |
General Comments 0
You need to be logged in to leave comments.
Login now