-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge correct columnization of CJK tag excerpts.
- Loading branch information
Showing
3 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from ..utils import fit_unicode | ||
|
||
|
||
def test_fit_unicode(): | ||
assert fit_unicode('abc', 3) == 'abc' | ||
assert fit_unicode('abc', 2) == 'ab' | ||
assert fit_unicode('a母', 2) == 'a ' | ||
assert fit_unicode('a母', 3) == 'a母' | ||
assert fit_unicode('a母母母s', 7) == 'a母母母' | ||
assert fit_unicode('a母母母s', 6) == 'a母母 ' | ||
assert fit_unicode('a母母母s', 5) == 'a母母' | ||
assert fit_unicode('a母母', 4) == 'a母 ' | ||
assert fit_unicode('a母', 6) == 'a母 ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters