@@ -9,7 +9,9 @@ import Test.Framework
99import Test.Framework.Providers.HUnit
1010import Test.HUnit hiding (Test)
1111
12−-- in Helpers
12+-- In the first argument, the String is the input, and the Pandoc
13+-- the output, of a pandoc reader. The input is shown in case
14+-- the test fails.
1315class Expect a where
1416 (=?>) :: (String, Pandoc) -> a -> Assertion
1517
@@ -21,12 +23,12 @@ infix 8 =?>
2123infix 6 =:
2224
2325instance Expect Inlines where
24− (s, Pandoc _ [Para ils]) =?> e = assertEqual s (toList e) ils
25− (s, g) =?> e = assertEqual s (doc $ para e) g
26+ (s, Pandoc _ [Para ils]) =?> e = assertEqual (show s) (toList e) ils
27+ (s, g) =?> e = assertEqual (show s) (doc $ para e) g
2628
2729instance Expect Blocks where
28− (s, Pandoc _ bls) =?> e = assertEqual s (toList e) bls
30+ (s, Pandoc _ bls) =?> e = assertEqual (show s) (toList e) bls
2931
3032instance Expect Pandoc where
31− (s, g) =?> e = assertEqual s e g
33+ (s, g) =?> e = assertEqual (show s) e g
3234