packages feed

ascii-group 1.0.0.16 → 1.0.0.17

raw patch · 4 files changed

+34/−87 lines, 4 filesdep +hspecdep −hedgehogdep ~basedep ~hashablePVP ok

version bump matches the API change (PVP)

Dependencies added: hspec

Dependencies removed: hedgehog

Dependency ranges changed: base, hashable

API changes (from Hackage documentation)

Files

ascii-group.cabal view
@@ -1,7 +1,7 @@ cabal-version: 3.0  name: ascii-group-version: 1.0.0.16+version: 1.0.0.17 synopsis: ASCII character groups category: Data, Text @@ -17,14 +17,10 @@ maintainer: Chris Martin, Julie Moronuki  homepage: https://github.com/typeclasses/ascii-group-bug-Reports: https://github.com/typeclasses/ascii-group/issues+bug-reports: https://github.com/typeclasses/ascii-group/issues  extra-source-files: *.md -source-repository head-    type: git-    location: git://github.com/typeclasses/ascii-group.git- common base     default-language: GHC2021     ghc-options: -Wall@@ -34,7 +30,7 @@      build-depends:       , ascii-char ^>= 1.0-      , base ^>= 4.16 || ^>= 4.17 || ^>= 4.18+      , base ^>= 4.16 || ^>= 4.17 || ^>= 4.18 || ^>= 4.19  library     import: base@@ -48,7 +44,7 @@         StandaloneDeriving      build-depends:-      , hashable ^>= 1.4.2+      , hashable ^>= 1.4.0      exposed-modules:         ASCII.Group@@ -61,7 +57,7 @@      build-depends:       , ascii-group-      , hedgehog ^>= 1.1.2 || ^>= 1.2+      , hspec ^>= 2.10 || ^>= 2.11      default-extensions:         OverloadedStrings
changelog.md view
@@ -1,3 +1,7 @@+### 1.0.0.17 (2023-12-31)++Change test-suite to `hspec`+ ### 1.0.0.16 (2023-06-26)  Raise language to GHC2021
license.txt view
@@ -1,4 +1,4 @@-Copyright 2021 Mission Valley Software LLC+Copyright 2021 Chris Martin  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
test/Main.hs view
@@ -1,92 +1,39 @@ module Main (main) where -import ASCII.Char (Char (..), allCharacters) import ASCII.Group-import Control.Monad (Monad (..), when)-import Data.Bool (not)++import Test.Hspec++import ASCII.Char (Char (..), allCharacters)+import Data.Bool (Bool(..)) import Data.Foldable (all) import Data.Function (($)) import Data.List (filter, length)-import Hedgehog-  ( Property,-    assert,-    checkParallel,-    discover,-    property,-    withTests,-    (===),-  )-import System.Exit (exitFailure) import System.IO (IO)  main :: IO ()-main = checkParallel $$(discover) >>= \ok -> when (not ok) exitFailure--prop_letter :: Property-prop_letter =-  withTests 1 $-    property $-      charGroup CapitalLetterA === Printable--prop_control :: Property-prop_control =-  withTests 1 $-    property $-      charGroup EndOfTransmission === Control--prop_not_printable :: Property-prop_not_printable =-  withTests 1 $-    property $-      assert $-        not $-          inGroup Printable EndOfTransmission--prop_is_control :: Property-prop_is_control =-  withTests 1 $-    property $-      assert $-        inGroup Control EndOfTransmission+main = hspec $ do+  it "" $ charGroup CapitalLetterA `shouldBe` Printable+  it "" $ charGroup EndOfTransmission `shouldBe` Control+  it "" $ inGroup Printable EndOfTransmission `shouldBe` False+  it "" $ inGroup Control EndOfTransmission `shouldBe` True --- It is perhaps surprising that space is considered a--- "printable" character, since it does not visibly appear.-prop_space_is_printable :: Property-prop_space_is_printable =-  withTests 1 $-    property $-      charGroup Space === Printable+  it "It is perhaps surprising that space is considered a\+     \ \"printable\" character, since it does not visibly appear." $+    charGroup Space `shouldBe` Printable --- It is perhaps surprising that horizontal tab is not--- in the same category as space.-prop_horizontal_tab_is_control :: Property-prop_horizontal_tab_is_control =-  withTests 1 $-    property $-      charGroup HorizontalTab === Control+  it "It is perhaps surprising that horizontal tab is not\+     \ in the same category as space." $+    charGroup HorizontalTab `shouldBe` Control -prop_various_printables :: Property-prop_various_printables =-  withTests 1 $-    property $-      assert $-        all (inGroup Printable) [CapitalLetterA, SmallLetterZ, Digit4, Tilde]+  it "" $+    all (inGroup Printable) [CapitalLetterA, SmallLetterZ, Digit4, Tilde]+      `shouldBe` True -prop_various_controls :: Property-prop_various_controls =-  withTests 1 $-    property $-      assert $-        all (inGroup Control) [Null, Substitute, UnitSeparator, Delete]+  it "" $+    all (inGroup Control) [Null, Substitute, UnitSeparator, Delete]+      `shouldBe` True -prop_count_printables :: Property-prop_count_printables =-  withTests 1 $-    property $-      length (filter (inGroup Printable) allCharacters) === 95+  it "" $ length (filter (inGroup Printable) allCharacters) `shouldBe` 95 -prop_count_controls :: Property-prop_count_controls =-  withTests 1 $-    property $-      length (filter (inGroup Control) allCharacters) === 33+  it "" $ length (filter (inGroup Control) allCharacters) `shouldBe` 33