add test case that all standard group preferred content expressions parse
This commit is contained in:
parent
2b311eebe4
commit
6e829939e9
2 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,7 @@ module Logs.PreferredContent (
|
|||
setStandardGroup,
|
||||
defaultStandardGroup,
|
||||
preferredRequiredMapsLoad,
|
||||
prop_standardGroups_parse,
|
||||
) where
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
@ -151,3 +152,8 @@ defaultStandardGroup u g =
|
|||
where
|
||||
hasgroup = not . S.null <$> lookupGroups u
|
||||
haspc = isJust . M.lookup u <$> preferredContentMap
|
||||
|
||||
prop_standardGroups_parse :: Bool
|
||||
prop_standardGroups_parse =
|
||||
all (isNothing . checkPreferredContentExpression . standardPreferredContent)
|
||||
[ minBound .. maxBound]
|
||||
|
|
2
Test.hs
2
Test.hs
|
@ -80,6 +80,7 @@ import qualified Types.Crypto
|
|||
import qualified Utility.Gpg
|
||||
#endif
|
||||
import qualified Messages
|
||||
import qualified Logs.PreferredContent
|
||||
|
||||
main :: [String] -> IO ()
|
||||
main ps = do
|
||||
|
@ -166,6 +167,7 @@ properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck"
|
|||
, testProperty "prop_view_roundtrips" Annex.View.prop_view_roundtrips
|
||||
, testProperty "prop_viewedFile_rountrips" Annex.View.ViewedFile.prop_viewedFile_roundtrips
|
||||
, testProperty "prop_b64_roundtrips" Utility.Base64.prop_b64_roundtrips
|
||||
, testProperty "prop_standardGroups_parse" Logs.PreferredContent.prop_standardGroups_parse
|
||||
]
|
||||
|
||||
{- These tests set up the test environment, but also test some basic parts
|
||||
|
|
Loading…
Reference in a new issue