Add mendeley citation tests.
This commit is contained in:
parent
d164e5bb1d
commit
697aea3717
4 changed files with 696 additions and 0 deletions
|
@ -380,6 +380,15 @@ tests = [ testGroup "document"
|
|||
"zotero with +citations"
|
||||
"docx/zotero_citations.docx"
|
||||
"docx/zotero_citations_plus.native"
|
||||
, testCompare
|
||||
"mendeley with -citations"
|
||||
"docx/mendeley_citations.docx"
|
||||
"docx/mendeley_citations_minus.native"
|
||||
, testCompareWithOpts def{readerExtensions =
|
||||
extensionsFromList [Ext_citations]}
|
||||
"mendeley with +citations"
|
||||
"docx/mendeley_citations.docx"
|
||||
"docx/mendeley_citations_plus.native"
|
||||
]
|
||||
, testGroup "track changes"
|
||||
[ testCompare
|
||||
|
|
BIN
test/docx/mendeley_citations.docx
Normal file
BIN
test/docx/mendeley_citations.docx
Normal file
Binary file not shown.
318
test/docx/mendeley_citations_minus.native
Normal file
318
test/docx/mendeley_citations_minus.native
Normal file
|
@ -0,0 +1,318 @@
|
|||
Pandoc
|
||||
Meta { unMeta = fromList [] }
|
||||
[ Para
|
||||
[ Str "This"
|
||||
, Space
|
||||
, Str "is"
|
||||
, Space
|
||||
, Str "a"
|
||||
, Space
|
||||
, Str "Mendeley"
|
||||
, Space
|
||||
, Str "test"
|
||||
, Space
|
||||
, Str "(prefix"
|
||||
, Space
|
||||
, Str "Hadwen-Bennett"
|
||||
, Space
|
||||
, Str "et"
|
||||
, Space
|
||||
, Str "al.,"
|
||||
, Space
|
||||
, Str "2018,"
|
||||
, Space
|
||||
, Str "p."
|
||||
, Space
|
||||
, Str "123"
|
||||
, Space
|
||||
, Str "suffix)."
|
||||
]
|
||||
, Para
|
||||
[ Str "Another"
|
||||
, Space
|
||||
, Str "test"
|
||||
, Space
|
||||
, Str "(prefix"
|
||||
, Space
|
||||
, Str "Seo,"
|
||||
, Space
|
||||
, Str "2019,"
|
||||
, Space
|
||||
, Str "pp."
|
||||
, Space
|
||||
, Str "10\8211\&20"
|
||||
, Space
|
||||
, Str "suffix)."
|
||||
]
|
||||
, Para
|
||||
[ Str "The"
|
||||
, Space
|
||||
, Str "last"
|
||||
, Space
|
||||
, Str "test"
|
||||
, Space
|
||||
, Str "(Koh"
|
||||
, Space
|
||||
, Str "&"
|
||||
, Space
|
||||
, Str "Abbas,"
|
||||
, Space
|
||||
, Str "2015;"
|
||||
, Space
|
||||
, Str "Lee"
|
||||
, Space
|
||||
, Str "et"
|
||||
, Space
|
||||
, Str "al.,"
|
||||
, Space
|
||||
, Str "2011)."
|
||||
]
|
||||
, Header 1 ( "references" , [] , [] ) [ Str "References" ]
|
||||
, Para
|
||||
[ Str "Hadwen-Bennett,"
|
||||
, Space
|
||||
, Str "A.,"
|
||||
, Space
|
||||
, Str "Sentance,"
|
||||
, Space
|
||||
, Str "S.,"
|
||||
, Space
|
||||
, Str "&"
|
||||
, Space
|
||||
, Str "Morrison,"
|
||||
, Space
|
||||
, Str "C."
|
||||
, Space
|
||||
, Str "(2018)."
|
||||
, Space
|
||||
, Str "Making"
|
||||
, Space
|
||||
, Str "Programming"
|
||||
, Space
|
||||
, Str "Accessible"
|
||||
, Space
|
||||
, Str "to"
|
||||
, Space
|
||||
, Str "Learners"
|
||||
, Space
|
||||
, Str "with"
|
||||
, Space
|
||||
, Str "Visual"
|
||||
, Space
|
||||
, Str "Impairments:"
|
||||
, Space
|
||||
, Str "A"
|
||||
, Space
|
||||
, Str "Literature"
|
||||
, Space
|
||||
, Str "Review."
|
||||
, Space
|
||||
, Emph
|
||||
[ Str "International"
|
||||
, Space
|
||||
, Str "Journal"
|
||||
, Space
|
||||
, Str "of"
|
||||
, Space
|
||||
, Str "Computer"
|
||||
, Space
|
||||
, Str "Science"
|
||||
, Space
|
||||
, Str "Education"
|
||||
, Space
|
||||
, Str "in"
|
||||
, Space
|
||||
, Str "Schools"
|
||||
]
|
||||
, Str ","
|
||||
, Space
|
||||
, Emph [ Str "2" ]
|
||||
, Str "(2),"
|
||||
, Space
|
||||
, Str "3\8211\&13."
|
||||
, Space
|
||||
, Str
|
||||
"https://www.microsoft.com/en-us/research/publication/making-programming-accessible-to-learners-with-visual-impairments-a-literature-review/"
|
||||
]
|
||||
, Para
|
||||
[ Str "Koh,"
|
||||
, Space
|
||||
, Str "K.,"
|
||||
, Space
|
||||
, Str "&"
|
||||
, Space
|
||||
, Str "Abbas,"
|
||||
, Space
|
||||
, Str "J."
|
||||
, Space
|
||||
, Str "(2015)."
|
||||
, Space
|
||||
, Str "Future"
|
||||
, Space
|
||||
, Str "of"
|
||||
, Space
|
||||
, Str "library"
|
||||
, Space
|
||||
, Str "and"
|
||||
, Space
|
||||
, Str "museum"
|
||||
, Space
|
||||
, Str "services"
|
||||
, Space
|
||||
, Str "supporting"
|
||||
, Space
|
||||
, Str "teen"
|
||||
, Space
|
||||
, Str "learning:"
|
||||
, Space
|
||||
, Str "Perceptions"
|
||||
, Space
|
||||
, Str "of"
|
||||
, Space
|
||||
, Str "professionals"
|
||||
, Space
|
||||
, Str "in"
|
||||
, Space
|
||||
, Str "learning"
|
||||
, Space
|
||||
, Str "labs"
|
||||
, Space
|
||||
, Str "and"
|
||||
, Space
|
||||
, Str "makerspaces."
|
||||
, Space
|
||||
, Emph
|
||||
[ Str "Journal"
|
||||
, Space
|
||||
, Str "of"
|
||||
, Space
|
||||
, Str "Research"
|
||||
, Space
|
||||
, Str "on"
|
||||
, Space
|
||||
, Str "Libraries"
|
||||
, Space
|
||||
, Str "\\&"
|
||||
, Space
|
||||
, Str "Young"
|
||||
, Space
|
||||
, Str "Adults"
|
||||
]
|
||||
, Str ","
|
||||
, Space
|
||||
, Emph [ Str "6" ]
|
||||
, Str "(4)."
|
||||
]
|
||||
, Para
|
||||
[ Str "Lee,"
|
||||
, Space
|
||||
, Str "I.,"
|
||||
, Space
|
||||
, Str "Martin,"
|
||||
, Space
|
||||
, Str "F.,"
|
||||
, Space
|
||||
, Str "Denner,"
|
||||
, Space
|
||||
, Str "J.,"
|
||||
, Space
|
||||
, Str "Coulter,"
|
||||
, Space
|
||||
, Str "B.,"
|
||||
, Space
|
||||
, Str "Allan,"
|
||||
, Space
|
||||
, Str "W.,"
|
||||
, Space
|
||||
, Str "Erickson,"
|
||||
, Space
|
||||
, Str "J.,"
|
||||
, Space
|
||||
, Str "Malyn-Smith,"
|
||||
, Space
|
||||
, Str "J.,"
|
||||
, Space
|
||||
, Str "&"
|
||||
, Space
|
||||
, Str "Werner,"
|
||||
, Space
|
||||
, Str "L."
|
||||
, Space
|
||||
, Str "(2011)."
|
||||
, Space
|
||||
, Str "Computational"
|
||||
, Space
|
||||
, Str "Thinking"
|
||||
, Space
|
||||
, Str "for"
|
||||
, Space
|
||||
, Str "Youth"
|
||||
, Space
|
||||
, Str "in"
|
||||
, Space
|
||||
, Str "Practice."
|
||||
, Space
|
||||
, Emph [ Str "ACM" , Space , Str "Inroads" ]
|
||||
, Str ","
|
||||
, Space
|
||||
, Emph [ Str "2" ]
|
||||
, Str "(1),"
|
||||
, Space
|
||||
, Str "32\8211\&37."
|
||||
, Space
|
||||
, Str "https://doi.org/10.1145/1929887.1929902"
|
||||
]
|
||||
, Para
|
||||
[ Str "Seo,"
|
||||
, Space
|
||||
, Str "J."
|
||||
, Space
|
||||
, Str "(2019)."
|
||||
, Space
|
||||
, Str "Is"
|
||||
, Space
|
||||
, Str "the"
|
||||
, Space
|
||||
, Str "Maker"
|
||||
, Space
|
||||
, Str "Movement"
|
||||
, Space
|
||||
, Str "Inclusive"
|
||||
, Space
|
||||
, Str "of"
|
||||
, Space
|
||||
, Str "{ANYONE}?:"
|
||||
, Space
|
||||
, Str "Three"
|
||||
, Space
|
||||
, Str "Accessibility"
|
||||
, Space
|
||||
, Str "Considerations"
|
||||
, Space
|
||||
, Str "to"
|
||||
, Space
|
||||
, Str "Invite"
|
||||
, Space
|
||||
, Str "Blind"
|
||||
, Space
|
||||
, Str "Makers"
|
||||
, Space
|
||||
, Str "to"
|
||||
, Space
|
||||
, Str "the"
|
||||
, Space
|
||||
, Str "Making"
|
||||
, Space
|
||||
, Str "World."
|
||||
, Space
|
||||
, Emph [ Str "TechTrends" ]
|
||||
, Str ","
|
||||
, Space
|
||||
, Emph [ Str "63" ]
|
||||
, Str "(5),"
|
||||
, Space
|
||||
, Str "514\8211\&520."
|
||||
, Space
|
||||
, Str "https://doi.org/10.1007/s11528-019-00377-3"
|
||||
]
|
||||
]
|
369
test/docx/mendeley_citations_plus.native
Normal file
369
test/docx/mendeley_citations_plus.native
Normal file
|
@ -0,0 +1,369 @@
|
|||
Pandoc
|
||||
Meta
|
||||
{ unMeta =
|
||||
fromList
|
||||
[ ( "references"
|
||||
, MetaList
|
||||
[ MetaMap
|
||||
(fromList
|
||||
[ ( "DOI"
|
||||
, MetaInlines [ Str "10.1145/1929887.1929902" ]
|
||||
)
|
||||
, ( "ISSN" , MetaInlines [ Str "2153-2184" ] )
|
||||
, ( "author"
|
||||
, MetaList
|
||||
[ MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family" , MetaString "Lee" )
|
||||
, ( "given" , MetaString "Irene" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family" , MetaString "Martin" )
|
||||
, ( "given" , MetaString "Fred" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family" , MetaString "Denner" )
|
||||
, ( "given" , MetaString "Jill" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family"
|
||||
, MetaString "Coulter"
|
||||
)
|
||||
, ( "given" , MetaString "Bob" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family" , MetaString "Allan" )
|
||||
, ( "given" , MetaString "Walter" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family"
|
||||
, MetaString "Erickson"
|
||||
)
|
||||
, ( "given" , MetaString "Jeri" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family"
|
||||
, MetaString "Malyn-Smith"
|
||||
)
|
||||
, ( "given" , MetaString "Joyce" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family" , MetaString "Werner" )
|
||||
, ( "given" , MetaString "Linda" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
]
|
||||
)
|
||||
, ( "container-title"
|
||||
, MetaInlines
|
||||
[ Str "ACM" , Space , Str "Inroads" ]
|
||||
)
|
||||
, ( "id" , MetaString "ITEM-1" )
|
||||
, ( "issue" , MetaString "1" )
|
||||
, ( "issued" , MetaString "2011-02" )
|
||||
, ( "page" , MetaString "32-37" )
|
||||
, ( "publisher" , MetaInlines [ Str "ACM" ] )
|
||||
, ( "publisher-place"
|
||||
, MetaInlines
|
||||
[ Str "New"
|
||||
, Space
|
||||
, Str "York,"
|
||||
, Space
|
||||
, Str "NY,"
|
||||
, Space
|
||||
, Str "USA"
|
||||
]
|
||||
)
|
||||
, ( "title"
|
||||
, MetaInlines
|
||||
[ Str "Computational"
|
||||
, Space
|
||||
, Str "Thinking"
|
||||
, Space
|
||||
, Str "for"
|
||||
, Space
|
||||
, Str "Youth"
|
||||
, Space
|
||||
, Str "in"
|
||||
, Space
|
||||
, Str "Practice"
|
||||
]
|
||||
)
|
||||
, ( "type" , MetaString "article-journal" )
|
||||
, ( "volume" , MetaString "2" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "author"
|
||||
, MetaList
|
||||
[ MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family" , MetaString "Koh" )
|
||||
, ( "given"
|
||||
, MetaString "Kyungwon"
|
||||
)
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
, MetaMap
|
||||
(fromList
|
||||
[ ( "dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "family" , MetaString "Abbas" )
|
||||
, ( "given" , MetaString "June" )
|
||||
, ( "non-dropping-particle"
|
||||
, MetaString ""
|
||||
)
|
||||
, ( "suffix" , MetaString "" )
|
||||
])
|
||||
]
|
||||
)
|
||||
, ( "container-title"
|
||||
, MetaInlines
|
||||
[ Str "Journal"
|
||||
, Space
|
||||
, Str "of"
|
||||
, Space
|
||||
, Str "Research"
|
||||
, Space
|
||||
, Str "on"
|
||||
, Space
|
||||
, Str "Libraries"
|
||||
, Space
|
||||
, Str "\\&"
|
||||
, Space
|
||||
, Str "Young"
|
||||
, Space
|
||||
, Str "Adults"
|
||||
]
|
||||
)
|
||||
, ( "id" , MetaString "ITEM-2" )
|
||||
, ( "issue" , MetaString "4" )
|
||||
, ( "issued" , MetaString "2015" )
|
||||
, ( "title"
|
||||
, MetaInlines
|
||||
[ Str "Future"
|
||||
, Space
|
||||
, Str "of"
|
||||
, Space
|
||||
, Str "library"
|
||||
, Space
|
||||
, Str "and"
|
||||
, Space
|
||||
, Str "museum"
|
||||
, Space
|
||||
, Str "services"
|
||||
, Space
|
||||
, Str "supporting"
|
||||
, Space
|
||||
, Str "teen"
|
||||
, Space
|
||||
, Str "learning:"
|
||||
, Space
|
||||
, Str "Perceptions"
|
||||
, Space
|
||||
, Str "of"
|
||||
, Space
|
||||
, Str "professionals"
|
||||
, Space
|
||||
, Str "in"
|
||||
, Space
|
||||
, Str "learning"
|
||||
, Space
|
||||
, Str "labs"
|
||||
, Space
|
||||
, Str "and"
|
||||
, Space
|
||||
, Str "makerspaces"
|
||||
]
|
||||
)
|
||||
, ( "type" , MetaString "article-journal" )
|
||||
, ( "volume" , MetaString "6" )
|
||||
])
|
||||
]
|
||||
)
|
||||
]
|
||||
}
|
||||
[ Para
|
||||
[ Str "This"
|
||||
, Space
|
||||
, Str "is"
|
||||
, Space
|
||||
, Str "a"
|
||||
, Space
|
||||
, Str "Mendeley"
|
||||
, Space
|
||||
, Str "test"
|
||||
, Space
|
||||
, Cite
|
||||
[ Citation
|
||||
{ citationId = "ITEM-1"
|
||||
, citationPrefix = [ Str "prefix" ]
|
||||
, citationSuffix =
|
||||
[ Space , Str "123" , Space , Str "suffix" ]
|
||||
, citationMode = NormalCitation
|
||||
, citationNoteNum = 0
|
||||
, citationHash = 0
|
||||
}
|
||||
]
|
||||
[ Str "(prefix"
|
||||
, Space
|
||||
, Str "Hadwen-Bennett"
|
||||
, Space
|
||||
, Str "et"
|
||||
, Space
|
||||
, Str "al.,"
|
||||
, Space
|
||||
, Str "2018,"
|
||||
, Space
|
||||
, Str "p."
|
||||
, Space
|
||||
, Str "123"
|
||||
, Space
|
||||
, Str "suffix)"
|
||||
]
|
||||
, Str "."
|
||||
]
|
||||
, Para
|
||||
[ Str "Another"
|
||||
, Space
|
||||
, Str "test"
|
||||
, Space
|
||||
, Cite
|
||||
[ Citation
|
||||
{ citationId = "ITEM-1"
|
||||
, citationPrefix = [ Str "prefix" ]
|
||||
, citationSuffix =
|
||||
[ Space , Str "10-20" , Space , Str "suffix" ]
|
||||
, citationMode = NormalCitation
|
||||
, citationNoteNum = 0
|
||||
, citationHash = 0
|
||||
}
|
||||
]
|
||||
[ Str "(prefix"
|
||||
, Space
|
||||
, Str "Seo,"
|
||||
, Space
|
||||
, Str "2019,"
|
||||
, Space
|
||||
, Str "pp."
|
||||
, Space
|
||||
, Str "10\8211\&20"
|
||||
, Space
|
||||
, Str "suffix)"
|
||||
]
|
||||
, Str "."
|
||||
]
|
||||
, Para
|
||||
[ Str "The"
|
||||
, Space
|
||||
, Str "last"
|
||||
, Space
|
||||
, Str "test"
|
||||
, Space
|
||||
, Cite
|
||||
[ Citation
|
||||
{ citationId = "ITEM-1"
|
||||
, citationPrefix = []
|
||||
, citationSuffix = []
|
||||
, citationMode = NormalCitation
|
||||
, citationNoteNum = 0
|
||||
, citationHash = 0
|
||||
}
|
||||
, Citation
|
||||
{ citationId = "ITEM-2"
|
||||
, citationPrefix = []
|
||||
, citationSuffix = []
|
||||
, citationMode = NormalCitation
|
||||
, citationNoteNum = 0
|
||||
, citationHash = 0
|
||||
}
|
||||
]
|
||||
[ Str "(Koh"
|
||||
, Space
|
||||
, Str "&"
|
||||
, Space
|
||||
, Str "Abbas,"
|
||||
, Space
|
||||
, Str "2015;"
|
||||
, Space
|
||||
, Str "Lee"
|
||||
, Space
|
||||
, Str "et"
|
||||
, Space
|
||||
, Str "al.,"
|
||||
, Space
|
||||
, Str "2011)"
|
||||
]
|
||||
, Str "."
|
||||
]
|
||||
, Header 1 ( "references" , [] , [] ) [ Str "References" ]
|
||||
]
|
Loading…
Reference in a new issue