diff options
-rw-r--r-- | Logs/PreferredContent.hs | 6 | ||||
-rw-r--r-- | Test.hs | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Logs/PreferredContent.hs b/Logs/PreferredContent.hs index 6c885041a..a81c16f26 100644 --- a/Logs/PreferredContent.hs +++ b/Logs/PreferredContent.hs @@ -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] @@ -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 |