aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Shared.hs13
-rw-r--r--tests/test-pandoc.hs7
2 files changed, 18 insertions, 2 deletions
diff --git a/tests/Tests/Shared.hs b/tests/Tests/Shared.hs
new file mode 100644
index 000000000..c7222c035
--- /dev/null
+++ b/tests/Tests/Shared.hs
@@ -0,0 +1,13 @@
+module Tests.Shared (tests) where
+import Test.Framework.Providers.QuickCheck2
+import Test.Framework
+import Tests.Arbitrary
+import Text.Pandoc.Shared
+import Text.Pandoc
+
+normalize_rt :: Pandoc -> Bool
+normalize_rt d = normalize (normalize d) == normalize d
+
+tests :: [Test]
+tests = [ testProperty "normalize_rt" normalize_rt ]
+
diff --git a/tests/test-pandoc.hs b/tests/test-pandoc.hs
index b67998177..9f3d65300 100644
--- a/tests/test-pandoc.hs
+++ b/tests/test-pandoc.hs
@@ -6,11 +6,14 @@ import Test.Framework
import qualified Tests.Old
import qualified Tests.Readers.LaTeX
+import qualified Tests.Shared
tests :: [Test]
tests = [ testGroup "Old" Tests.Old.tests
- , testGroup "Readers" [ testGroup "LaTeX" Tests.Readers.LaTeX.tests
- ]
+ , testGroup "Readers"
+ [ testGroup "LaTeX" Tests.Readers.LaTeX.tests
+ ]
+ , testGroup "Shared" Tests.Shared.tests
]
main :: IO ()