avoid whitespace in Arbitrary UUID and empty UUID
This commit is contained in:
parent
6ef38df881
commit
c6c5f6336b
1 changed files with 5 additions and 1 deletions
|
@ -90,4 +90,8 @@ instance Arbitrary UUID where
|
|||
-- Avoid non-ascii because fully arbitrary
|
||||
-- strings may not be encoded using the filesystem
|
||||
-- encoding, which is normally applied to all input.
|
||||
arb = encodeBS <$> arbitrary `suchThat` all isAscii
|
||||
-- Avoid whitespace because UUIDs are used in log files.
|
||||
-- Avoid empty because that's NoUUID
|
||||
arb = encodeBS . getNonEmpty <$> arbitrary
|
||||
`suchThat` (all isAscii . getNonEmpty)
|
||||
`suchThat` (all (not . isSpace) . getNonEmpty)
|
||||
|
|
Loading…
Reference in a new issue