Consume tokens matching 0 characters at the end
Some checks failed
Build / audit (push) Failing after 1s
Build / test (push) Successful in 16m52s

This commit is contained in:
2024-09-10 11:33:31 +02:00
parent 6ead225e88
commit 74da0eb391
2 changed files with 60 additions and 54 deletions

View File

@ -41,3 +41,8 @@ spec = do
let expected = Nothing
actual = match "2.6.0-rc1" "2.6.0"
in actual `shouldBe` expected
it "consumes the last token matching nothing" $
let expected = Just "abc"
actual = match "abc\\d\\d" "abc"
in actual `shouldBe` expected