support 80-screen-width tracking wallet labels

Labels with double-wide CJK characters can already occupy 80 terminal cells.
Extend the same privilege to all labels.
This commit is contained in:
The MMGen Project 2019-05-28 14:49:44 +00:00
commit d7bfc8307e
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
10 changed files with 84 additions and 54 deletions

View file

@ -144,15 +144,22 @@ tests = OrderedDict([
)
}),
('MMGenWalletLabel', {
'bad': (utf8_text[:49],utf8_text_combining[:48],utf8_text_control[:48]),
'bad': (utf8_text[:49],utf8_combining[:48],utf8_ctrl[:48]),
'good': (utf8_text[:48],)
}),
('TwComment', {
'bad': (utf8_text[:41],utf8_text_combining[:40],utf8_text_control[:40]),
'good': (utf8_text[:40],)
'bad': ( utf8_combining[:40],
utf8_ctrl[:40],
text_jp[:41],
text_zh[:41],
utf8_text[:81] ),
'good': ( utf8_text[:80],
(ru_uc + gr_uc + utf8_text)[:80],
text_jp[:40],
text_zh[:40] )
}),
('MMGenTXLabel',{
'bad': (utf8_text[:73],utf8_text_combining[:72],utf8_text_control[:72]),
'bad': (utf8_text[:73],utf8_combining[:72],utf8_ctrl[:72]),
'good': (utf8_text[:72],)
}),
('MMGenPWIDString', { # forbidden = list(u' :/\\')