Recognize + in sematnic tags
All checks were successful
Build / audit (push) Successful in 14m54s
Build / test (push) Successful in 14m20s

This commit is contained in:
2024-03-19 11:34:19 +01:00
parent 3d81917627
commit bc3ba48d85
7 changed files with 309 additions and 242 deletions

View File

@ -1,3 +1,7 @@
{- This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/. -}
module SlackBuilder.InfoSpec
( spec
) where

View File

@ -0,0 +1,24 @@
{- This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/. -}
module SlackBuilder.LatestVersionCheckSpec
( spec
) where
import SlackBuilder.LatestVersionCheck
import Test.Hspec (Spec, describe, it, shouldBe)
spec :: Spec
spec = do
describe "stableTagTransform" $ do
it "excludes tags with +" $
let given = "v2.6.0+unreleased"
actual = stableTagTransform given
in actual `shouldBe` Nothing
it "recognizes a stable version" $
let given = "v2.6.0"
actual = stableTagTransform given
expected = Just "2.6.0"
in actual `shouldBe` expected

View File

@ -1,3 +1,7 @@
{- This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/. -}
module SlackBuilder.PackageSpec
( spec
) where