sydtest-discover 0.0.0.3 → 0.0.0.4
raw patch · 4 files changed
+19/−7 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- LICENSE.md +1/−1
- src/Test/Syd/Discover.hs +9/−3
- sydtest-discover.cabal +3/−3
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## [0.0.0.4] - 2023-10-04++### Changelog++* Removed use of partial function `head`.+ ## [0.0.0.3] - 2023-04-29 ### Changed
LICENSE.md view
@@ -1,5 +1,5 @@ # Sydtest License -Copyright (c) 2020-2021 Tom Sydney Kerckhove+Copyright (c) 2020-2023 Tom Sydney Kerckhove See the Sydtest License at https://github.com/NorfairKing/sydtest/blob/master/sydtest/LICENSE.md for the full license text.
src/Test/Syd/Discover.hs view
@@ -31,7 +31,13 @@ -- we're traversing up the file tree until we find a directory that doesn't start with an uppercase letter findTestBaseDir :: Path Abs a -> Path Abs Dir-findTestBaseDir specSourceFile = if isUpper (head (toFilePath $ dirname directParent)) then findTestBaseDir directParent else directParent+findTestBaseDir specSourceFile =+ case listToMaybe (toFilePath $ dirname directParent) of+ Nothing -> directParent+ Just c ->+ if isUpper c+ then findTestBaseDir directParent+ else directParent where directParent = parent specSourceFile @@ -174,8 +180,8 @@ if null fs then ["spec = Prelude.pure ()"] else- "spec = do" :- map moduleSpecLine fs+ "spec = do"+ : map moduleSpecLine fs moduleSpecLine :: SpecModule -> String moduleSpecLine rf = unwords [" ", "describe", "\"" <> specModuleModuleName rf <> "\"", specFunctionName rf]
sydtest-discover.cabal view
@@ -1,18 +1,18 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.7.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack name: sydtest-discover-version: 0.0.0.3+version: 0.0.0.4 synopsis: Automatic test suite discovery for sydtest category: Testing homepage: https://github.com/NorfairKing/sydtest#readme bug-reports: https://github.com/NorfairKing/sydtest/issues author: Tom Sydney Kerckhove maintainer: syd@cs-syd.eu-copyright: Copyright (c) 2020-2021 Tom Sydney Kerckhove+copyright: Copyright (c) 2020-2023 Tom Sydney Kerckhove license: OtherLicense license-file: LICENSE.md build-type: Simple