fonttools/Tests/misc/textTools_test.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
264 B
Python
Raw Permalink Normal View History

from fontTools.misc.textTools import pad
def test_pad():
assert len(pad(b"abcd", 4)) == 4
assert len(pad(b"abcde", 2)) == 6
assert len(pad(b"abcde", 4)) == 8
assert pad(b"abcdef", 4) == b"abcdef\x00\x00"
assert pad(b"abcdef", 1) == b"abcdef"