aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-10-18 15:03:50 +0200
committerJohn MacFarlane <[email protected]>2025-10-18 15:03:50 +0200
commit350b821d7c7df2901ea5c393b5be543f7d85a2b5 (patch)
treecfb8f5357d2e2f62da1214f8a00ebd1f72958ff3 /test
parenteb9bfb6b962efda02d33f548adc09939c5c005df (diff)
Update to use latest dev citeproc.
Fixed golden test regeneration in Docx reader test.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Docx.hs3
-rw-r--r--test/docx/mendeley_citations_plus.native19
-rw-r--r--test/docx/zotero_citations_plus.native24
3 files changed, 29 insertions, 17 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index f8c162709..0bd70d0e2 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -57,7 +57,8 @@ testCompareWithOpts opts testName docxFP nativeFP =
(do df <- B.readFile docxFP
runIOorExplode (readDocx opts df))
(nativeDiff nativeFP)
- (\a -> runIOorExplode (writeNative def a) >>= BS.writeFile nativeFP . UTF8.fromText)
+ (\a -> runIOorExplode (writeNative def{ writerTemplate = Just mempty} a)
+ >>= BS.writeFile nativeFP . UTF8.fromText)
testForWarningsWithOptsIO :: ReaderOptions -> String -> FilePath -> [String] -> IO TestTree
testForWarningsWithOptsIO opts name docxFile expected = do
diff --git a/test/docx/mendeley_citations_plus.native b/test/docx/mendeley_citations_plus.native
index 53867ca22..c4bb46f60 100644
--- a/test/docx/mendeley_citations_plus.native
+++ b/test/docx/mendeley_citations_plus.native
@@ -121,9 +121,9 @@ Pandoc
[ Str "ACM" , Space , Str "Inroads" ]
)
, ( "id" , MetaString "ITEM-1" )
- , ( "issue" , MetaString "1" )
+ , ( "issue" , MetaInlines [ Str "1" ] )
, ( "issued" , MetaString "2011-02" )
- , ( "page" , MetaString "32-37" )
+ , ( "page" , MetaInlines [ Str "32-37" ] )
, ( "publisher" , MetaInlines [ Str "ACM" ] )
, ( "publisher-place"
, MetaInlines
@@ -152,7 +152,7 @@ Pandoc
]
)
, ( "type" , MetaString "article-journal" )
- , ( "volume" , MetaString "2" )
+ , ( "volume" , MetaInlines [ Str "2" ] )
])
, MetaMap
(fromList
@@ -206,7 +206,7 @@ Pandoc
]
)
, ( "id" , MetaString "ITEM-2" )
- , ( "issue" , MetaString "4" )
+ , ( "issue" , MetaInlines [ Str "4" ] )
, ( "issued" , MetaString "2015" )
, ( "title"
, MetaInlines
@@ -246,7 +246,7 @@ Pandoc
]
)
, ( "type" , MetaString "article-journal" )
- , ( "volume" , MetaString "6" )
+ , ( "volume" , MetaInlines [ Str "6" ] )
])
]
)
@@ -268,7 +268,7 @@ Pandoc
{ citationId = "ITEM-1"
, citationPrefix = [ Str "prefix" ]
, citationSuffix =
- [ Str ",", Space , Str "123" , Space , Str "suffix" ]
+ [ Str "," , Space , Str "123" , Space , Str "suffix" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
@@ -302,7 +302,12 @@ Pandoc
{ citationId = "ITEM-1"
, citationPrefix = [ Str "prefix" ]
, citationSuffix =
- [ Str ",", Space , Str "10-20" , Space , Str "suffix" ]
+ [ Str ","
+ , Space
+ , Str "10-20"
+ , Space
+ , Str "suffix"
+ ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
diff --git a/test/docx/zotero_citations_plus.native b/test/docx/zotero_citations_plus.native
index 829fda8b7..3e7c50f5d 100644
--- a/test/docx/zotero_citations_plus.native
+++ b/test/docx/zotero_citations_plus.native
@@ -54,10 +54,12 @@ Pandoc
]
)
, ( "id" , MetaString "10" )
- , ( "issue" , MetaString "18" )
+ , ( "issue" , MetaInlines [ Str "18" ] )
, ( "issued" , MetaString "2016" )
, ( "language" , MetaInlines [ Str "en" ] )
- , ( "page" , MetaString "9852\8211\&9859" )
+ , ( "page"
+ , MetaInlines [ Str "9852\8211\&9859" ]
+ )
, ( "title"
, MetaInlines
[ Str "New"
@@ -90,7 +92,7 @@ Pandoc
]
)
, ( "type" , MetaString "article-journal" )
- , ( "volume" , MetaString "43" )
+ , ( "volume" , MetaInlines [ Str "43" ] )
])
, MetaMap
(fromList
@@ -131,10 +133,12 @@ Pandoc
[ Str "Climate" , Space , Str "Dynamics" ]
)
, ( "id" , MetaString "109" )
- , ( "issue" , MetaString "11-12" )
+ , ( "issue" , MetaInlines [ Str "11-12" ] )
, ( "issued" , MetaString "2013-12" )
, ( "language" , MetaInlines [ Str "en" ] )
- , ( "page" , MetaString "3325\8211\&3338" )
+ , ( "page"
+ , MetaInlines [ Str "3325\8211\&3338" ]
+ )
, ( "title"
, MetaInlines
[ Str "A"
@@ -165,7 +169,7 @@ Pandoc
]
)
, ( "type" , MetaString "article-journal" )
- , ( "volume" , MetaString "41" )
+ , ( "volume" , MetaInlines [ Str "41" ] )
])
, MetaMap
(fromList
@@ -280,7 +284,9 @@ Pandoc
, ( "id" , MetaString "6" )
, ( "issued" , MetaString "2016" )
, ( "language" , MetaInlines [ Str "en" ] )
- , ( "page" , MetaString "3751\8211\&3777" )
+ , ( "page"
+ , MetaInlines [ Str "3751\8211\&3777" ]
+ )
, ( "title"
, MetaInlines
[ Str "The"
@@ -297,7 +303,7 @@ Pandoc
]
)
, ( "type" , MetaString "article-journal" )
- , ( "volume" , MetaString "9" )
+ , ( "volume" , MetaInlines [ Str "9" ] )
])
]
)
@@ -412,7 +418,7 @@ Pandoc
{ citationId = "10"
, citationPrefix = [ Str "prefix" ]
, citationSuffix =
- [ Str ",", Space , Str "2" , Space , Str "suffix" ]
+ [ Str "," , Space , Str "2" , Space , Str "suffix" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0