diff options
author | benadha <benawiadha@gmail.com> | 2022-01-15 14:07:52 +0700 |
---|---|---|
committer | benadha <benawiadha@gmail.com> | 2022-01-15 14:07:52 +0700 |
commit | 75b5e6a04a116902703cc99d12889b10bcd23023 (patch) | |
tree | 7c64fe14788ff55210bd255eed7fe7ac1aa5a535 /tests/test_text_parser.py | |
parent | bde59b1d0eeac75301459331e76df337b06f6749 (diff) | |
download | epy-75b5e6a04a116902703cc99d12889b10bcd23023.tar.gz |
URL early support
Diffstat (limited to 'tests/test_text_parser.py')
-rw-r--r-- | tests/test_text_parser.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_text_parser.py b/tests/test_text_parser.py index 42a98d3..9573915 100644 --- a/tests/test_text_parser.py +++ b/tests/test_text_parser.py @@ -1,6 +1,15 @@ from epy import CharPos, TextMark, TextSpan, HTMLtoLines +def test_text_mark_validation_check(): + assert TextMark(start=CharPos(row=3, col=1), end=CharPos(row=3, col=5)).is_valid() + assert TextMark(start=CharPos(row=3, col=5), end=CharPos(row=3, col=5)).is_valid() + assert not TextMark(start=CharPos(row=3, col=5), end=CharPos(row=3, col=2)).is_valid() + assert TextMark(start=CharPos(row=3, col=5), end=CharPos(row=5, col=2)).is_valid() + assert not TextMark(start=CharPos(row=8, col=5), end=CharPos(row=5, col=2)).is_valid() + assert not TextMark(start=CharPos(row=0, col=3)).is_valid() + + def test_mark_to_span(): text = [ "Lorem ipsum dolor sit amet,", |