doctest 0.22.7 → 0.22.8
raw patch · 4 files changed
+10/−3 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES.markdown +3/−0
- doctest.cabal +1/−1
- src/Cabal/Options.hs +5/−1
- test/Cabal/OptionsSpec.hs +1/−1
CHANGES.markdown view
@@ -1,3 +1,6 @@+Changes in 0.22.8+ - cabal-doctest: Fix handling of options with optional arguments+ Changes in 0.22.7 - cabal-doctest: Accept component - cabal-doctest: Get rid of separate `cabal build` step
doctest.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: doctest-version: 0.22.7+version: 0.22.8 synopsis: Test interactive Haskell examples description: `doctest` is a tool that checks [examples](https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810775744) and [properties](https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810771856)
src/Cabal/Options.hs view
@@ -71,4 +71,8 @@ discardReplOptions :: [String] -> [String] discardReplOptions args = case getOpt Permute options args of- (xs, _, _) -> concat [name : maybeToList value | Argument name value <- xs, Set.notMember name replOnlyOptions]+ (xs, _, _) -> [renderArgument name value | Argument name value <- xs, Set.notMember name replOnlyOptions]+ where+ renderArgument name = \ case+ Nothing -> name+ Just value -> name <> "=" <> value
test/Cabal/OptionsSpec.hs view
@@ -57,4 +57,4 @@ , "--repl-options", "foo" , "--repl-options=foo" , "--allow-newer"- ] `shouldBe` ["--with-compiler", "ghc-9.10", "--disable-optimization", "--allow-newer"]+ ] `shouldBe` ["--with-compiler=ghc-9.10", "--disable-optimization", "--allow-newer"]