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