Fix throw when passing -1 from inital parser

This commit is contained in:
Florian Schroedl
2022-01-20 17:00:00 +01:00
parent fd8e0254f0
commit a4dfffdacf
2 changed files with 9 additions and 5 deletions

View File

@@ -20,3 +20,4 @@ suite "utils/str":
let t = "foo\nbar"
check(t.deleteAfterNewline() == "foo")
check(t.deleteAfterNewline(start = 4) == t)
check(t.deleteAfterNewline(start = -1) == t)