Tests.Arbitrary: don't allow empty list items.
This commit is contained in:
parent
e9899b9ab8
commit
18089a44f5
1 changed files with 5 additions and 3 deletions
|
@ -13,8 +13,10 @@ import Text.Pandoc.Builder
|
|||
realString :: Gen String
|
||||
realString = resize 8 arbitrary -- elements wordlist
|
||||
|
||||
{-
|
||||
wordlist :: [String]
|
||||
wordlist = ["foo","Bar","baz","\\","/",":","\"","'","féé"]
|
||||
-}
|
||||
|
||||
instance Arbitrary Inlines where
|
||||
arbitrary = liftM fromList arbitrary
|
||||
|
@ -80,9 +82,9 @@ arbBlock n = frequency $ [ (10, liftM Plain arbitrary)
|
|||
] ++ [x | x <- nesters, n > 0]
|
||||
where nesters = [ (5, liftM BlockQuote $ listOf $ arbBlock (n-1))
|
||||
, (5, liftM2 OrderedList arbitrary
|
||||
$ (listOf $ listOf $ arbBlock (n-1)))
|
||||
, (5, liftM BulletList $ (listOf $ listOf $ arbBlock (n-1)))
|
||||
, (5, do x1 <- listOf $ listOf $ listOf $ arbBlock (n-1)
|
||||
$ (listOf1 $ listOf1 $ arbBlock (n-1)))
|
||||
, (5, liftM BulletList $ (listOf1 $ listOf1 $ arbBlock (n-1)))
|
||||
, (5, do x1 <- listOf $ listOf1 $ listOf1 $ arbBlock (n-1)
|
||||
x2 <- arbitrary
|
||||
return (DefinitionList $ zip x2 x1))
|
||||
, (2, do rs <- choose (1 :: Int, 4)
|
||||
|
|
Loading…
Add table
Reference in a new issue