mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
fix CJK characters width in output
This commit is contained in:
parent
528c7afd18
commit
605b39f617
2 changed files with 21 additions and 3 deletions
|
|
@ -52,6 +52,18 @@ def test_full_msg():
|
|||
assert ret == 'start......end\n'
|
||||
|
||||
|
||||
def test_full_msg_with_cjk():
|
||||
ret = _full_msg(
|
||||
start='啊あ아',
|
||||
end_msg='end',
|
||||
end_color='',
|
||||
use_color=False,
|
||||
cols=15,
|
||||
)
|
||||
# 5 dots: 15 - 6 - 3 - 1
|
||||
assert ret == '啊あ아.....end\n'
|
||||
|
||||
|
||||
def test_full_msg_with_color():
|
||||
ret = _full_msg(
|
||||
start='start',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue