aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-05-14 06:37:29 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-05-14 06:37:29 -0700
commitb5959b20073f04b7b5ecb19e2ab0ce56a5ecadb0 (patch)
tree4f05dcecdf9cae5fb6bf123bade09c71e77b316c /tests
parent222a51bf99bc6b0bfc6be6ebc03159a0ad875e4f (diff)
parentceeb701c254c6dc4c054e10dd151d9ef6f751ad7 (diff)
downloadpandoc-b5959b20073f04b7b5ecb19e2ab0ce56a5ecadb0.tar.gz
Merge pull request #1297 from tarleb/citations
Org reader: support Pandocs citation extension
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Org.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 4ef7a7731..ca97ba348 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -225,6 +225,28 @@ tests =
]
)
"echo 'Hello, World'")
+
+ , "Citation" =:
+ "[@nonexistent]" =?>
+ let citation = Citation
+ { citationId = "nonexistent"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0}
+ in (para $ cite [citation] "[@nonexistent]")
+
+ , "Citation containing text" =:
+ "[see @item1 p. 34-35]" =?>
+ let citation = Citation
+ { citationId = "item1"
+ , citationPrefix = [Str "see"]
+ , citationSuffix = [Space ,Str "p.",Space,Str "34-35"]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0}
+ in (para $ cite [citation] "[see @item1 p. 34-35]")
]
, testGroup "Meta Information" $