Introduce a matcher for one or more matched digits
This commit is contained in:
@ -27,7 +27,7 @@ spec = do
|
||||
actual = match "(v)2.6.\\d" "v2.6.0"
|
||||
in actual `shouldBe` expected
|
||||
|
||||
it "matches digits and dot" $
|
||||
it "matches digits and dots" $
|
||||
let expected = Just "2.6.0"
|
||||
actual = match "(v)\\." "v2.6.0"
|
||||
in actual `shouldBe` expected
|
||||
@ -46,3 +46,8 @@ spec = do
|
||||
let expected = Just "abc"
|
||||
actual = match "abc\\d\\d" "abc"
|
||||
in actual `shouldBe` expected
|
||||
|
||||
it "matches at least one digit" $
|
||||
let expected = Nothing
|
||||
actual = match "1.\\D.3" "1..3"
|
||||
in actual `shouldBe` expected
|
||||
|
Reference in New Issue
Block a user