Add match function for simple tag globbing
This commit is contained in:
@ -22,3 +22,19 @@ spec = do
|
||||
actual = stableTagTransform given
|
||||
expected = Just "2.6.0"
|
||||
in actual `shouldBe` expected
|
||||
|
||||
describe "match" $ do
|
||||
it "matches an exact tag prefixed with v" $
|
||||
let expected = Just "2.6.0"
|
||||
actual = match "(v)2.6.0" "v2.6.0"
|
||||
in actual `shouldBe` expected
|
||||
|
||||
it "matches a glob pattern prefixed with v" $
|
||||
let expected = Just "2.6.0"
|
||||
actual = match "(v)*" "v2.6.0"
|
||||
in actual `shouldBe` expected
|
||||
|
||||
it "ignores suffix after wildcard" $
|
||||
let expected = Just "2.6.0"
|
||||
actual = match "(v)*(-rc1)" "v2.6.0-rc1"
|
||||
in actual `shouldBe` expected
|
||||
|
Reference in New Issue
Block a user