aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/test
diff options
context:
space:
mode:
Diffstat (limited to 'haddock-api/test')
-rw-r--r--haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs b/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs
index 5e69b446..38cdbc87 100644
--- a/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs
+++ b/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs
@@ -2,6 +2,7 @@ module Haddock.Backends.Hyperlinker.ParserSpec (main, spec) where
import Test.Hspec
+import Test.QuickCheck
import Haddock.Backends.Hyperlinker.Parser
@@ -18,6 +19,12 @@ spec = do
parseSpec :: Spec
parseSpec = do
+ it "is total" $
+ property $ \src -> length (parse src) `shouldSatisfy` (>= 0)
+
+ it "retains file layout" $
+ property $ \src -> concatMap tkValue (parse src) == src
+
context "when parsing single-line comments" $ do
it "should ignore content until the end of line" $