Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
os: [ubuntu-latest]
cabal: ["3.12.1.0"]
ghc: ["9.6.7", "9.8.4", "9.10.2"]
include:
# Test only with latest GHC on macOS
- os: macOS-latest # arm based macos system
ghc: 9.10.2
steps:
- name: Clone Repository
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions test/TestData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module TestData
)
where

import Addy.Internal.Char (utf8NonAscii)
import Addy.Internal.Char (utf8NonAscii, atext)
import Data.Aeson (FromJSON)
import qualified Data.Aeson as Aeson
import Data.Char
Expand Down Expand Up @@ -200,7 +200,7 @@ genDomain =
where
okay :: Text -> Bool
okay t =
Text.all allowedChar t
Text.all atext t
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some flakiness in the tests. A couple of them result in InvalidCharactersError and InvalidLengthError. This change fixes the first one. Domain name is considered valid over atext. But property tests were allowing all ascii characters (Eg: ;).

&& not (Text.isPrefixOf "-" t)
&& not (Text.isSuffixOf "-" t)

Expand Down