aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/Org/Inline/Citation.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Tests/Readers/Org/Inline/Citation.hs')
-rw-r--r--test/Tests/Readers/Org/Inline/Citation.hs44
1 files changed, 41 insertions, 3 deletions
diff --git a/test/Tests/Readers/Org/Inline/Citation.hs b/test/Tests/Readers/Org/Inline/Citation.hs
index 792e4559c..a11804983 100644
--- a/test/Tests/Readers/Org/Inline/Citation.hs
+++ b/test/Tests/Readers/Org/Inline/Citation.hs
@@ -1,8 +1,7 @@
-{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Tests.Readers.Org.Inline.Citation
- Copyright : © 2014-2020 Albert Krewinkel
+ Copyright : © 2014-2021 Albert Krewinkel
License : GNU GPL, version 2 or above
Maintainer : Albert Krewinkel <albert@zeitkraut.de>
@@ -13,7 +12,6 @@ Test parsing of citations in org input.
-}
module Tests.Readers.Org.Inline.Citation (tests) where
-import Prelude
import Test.Tasty (TestTree, testGroup)
import Tests.Helpers ((=?>))
import Tests.Readers.Org.Shared ((=:))
@@ -118,6 +116,46 @@ tests =
}
in (para $ cite [citation] "citep:pandoc")
+ , "multiple simple citations" =:
+ "citep:picard,riker" =?>
+ let picard = Citation
+ { citationId = "picard"
+ , citationPrefix = mempty
+ , citationSuffix = mempty
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ riker = Citation
+ { citationId = "riker"
+ , citationPrefix = mempty
+ , citationSuffix = mempty
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ in (para $ cite [picard,riker] "citep:picard,riker")
+
+ , "multiple simple citations succeeded by comma" =:
+ "citep:picard,riker," =?>
+ let picard = Citation
+ { citationId = "picard"
+ , citationPrefix = mempty
+ , citationSuffix = mempty
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ riker = Citation
+ { citationId = "riker"
+ , citationPrefix = mempty
+ , citationSuffix = mempty
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ in (para $ cite [picard,riker] "citep:picard,riker" <> str ",")
+
, "extended citation" =:
"[[citep:Dominik201408][See page 20::, for example]]" =?>
let citation = Citation