aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Arbitrary.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-29 10:02:12 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-29 10:02:12 -0800
commit18089a44f56dc76d7a2ec3cfc44e64ffe502487f (patch)
treea4751f31ad6f32d0241434cd4a538d074aeec349 /tests/Tests/Arbitrary.hs
parente9899b9ab87efe2eeb719403816dc83d8133f4e4 (diff)
downloadpandoc-18089a44f56dc76d7a2ec3cfc44e64ffe502487f.tar.gz
Tests.Arbitrary: don't allow empty list items.
Diffstat (limited to 'tests/Tests/Arbitrary.hs')
-rw-r--r--tests/Tests/Arbitrary.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/Tests/Arbitrary.hs b/tests/Tests/Arbitrary.hs
index 70809a71a..978717bef 100644
--- a/tests/Tests/Arbitrary.hs
+++ b/tests/Tests/Arbitrary.hs
@@ -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)