mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 17:56:32 +00:00
Added Cite to Arbitrary instance.
See #1269. This reveals some test failures.
This commit is contained in:
@@ -64,6 +64,7 @@ arbInline n = frequency $ [ (60, liftM Str realString)
|
||||
x3 <- realString
|
||||
x2 <- liftM escapeURI realString
|
||||
return $ Image x1 (x2,x3))
|
||||
, (2, liftM2 Cite arbitrary (arbInlines 1))
|
||||
, (2, liftM Note $ resize 3 $ listOf1 $ arbBlock (n-1))
|
||||
]
|
||||
|
||||
@@ -111,7 +112,6 @@ instance Arbitrary Pandoc where
|
||||
arbitrary = resize 8 $ liftM normalize
|
||||
$ liftM2 Pandoc arbitrary arbitrary
|
||||
|
||||
{-
|
||||
instance Arbitrary CitationMode where
|
||||
arbitrary
|
||||
= do x <- choose (0 :: Int, 2)
|
||||
@@ -123,14 +123,13 @@ instance Arbitrary CitationMode where
|
||||
|
||||
instance Arbitrary Citation where
|
||||
arbitrary
|
||||
= do x1 <- liftM (filter (`notElem` ",;]@ \t\n")) arbitrary
|
||||
x2 <- arbitrary
|
||||
x3 <- arbitrary
|
||||
= do x1 <- listOf $ elements $ ['a'..'z'] ++ ['0'..'9'] ++ ['_']
|
||||
x2 <- arbInlines 1
|
||||
x3 <- arbInlines 1
|
||||
x4 <- arbitrary
|
||||
x5 <- arbitrary
|
||||
x6 <- arbitrary
|
||||
return (Citation x1 x2 x3 x4 x5 x6)
|
||||
-}
|
||||
|
||||
instance Arbitrary MathType where
|
||||
arbitrary
|
||||
|
||||
Reference in New Issue
Block a user