Show warning if :lines: and :emphasize-lines: get out of range

This commit is contained in:
Takeshi KOMIYA
2017-02-21 13:27:37 +09:00
parent 8ba6c6556e
commit 5bfdc6ae4f
3 changed files with 37 additions and 22 deletions

View File

@@ -106,6 +106,7 @@ def test_parselinenos():
assert parselinenos('7-', 10) == [6, 7, 8, 9]
assert parselinenos('1,7-', 10) == [0, 6, 7, 8, 9]
assert parselinenos('7-7', 10) == [6]
assert parselinenos('11-', 10) == [10]
with pytest.raises(ValueError):
parselinenos('1-2-3', 10)
with pytest.raises(ValueError):
@@ -114,5 +115,3 @@ def test_parselinenos():
parselinenos('-', 10)
with pytest.raises(ValueError):
parselinenos('3-1', 10)
with pytest.raises(ValueError):
parselinenos('11-', 10)