aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormb21 <mb21@users.noreply.github.com>2018-09-15 16:47:53 +0200
committermb21 <mb21@users.noreply.github.com>2018-09-15 17:06:10 +0200
commit5347e9454fae70cd2b534ad8e3c02d1cea8c2d93 (patch)
treec8df854a63f76ad43d064f9343c00be85c96bee0
parent6aa5fcac13ea702de19ee1a605631e3ac75d7e05 (diff)
downloadpandoc-5347e9454fae70cd2b534ad8e3c02d1cea8c2d93.tar.gz
add test for --metadata-file
-rw-r--r--pandoc.cabal1
-rw-r--r--test/command/yaml-metadata-blocks.md15
-rw-r--r--test/command/yaml-metadata.yaml4
3 files changed, 20 insertions, 0 deletions
diff --git a/pandoc.cabal b/pandoc.cabal
index 86fe68dcf..591c1960c 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -193,6 +193,7 @@ extra-source-files:
test/command/sub-file-chapter-1.tex
test/command/sub-file-chapter-2.tex
test/command/bar.tex
+ test/command/yaml-metadata.yaml
test/command/3510-subdoc.org
test/command/3510-export.latex
test/command/3510-src.hs
diff --git a/test/command/yaml-metadata-blocks.md b/test/command/yaml-metadata-blocks.md
index eae69aa3d..5b73cff72 100644
--- a/test/command/yaml-metadata-blocks.md
+++ b/test/command/yaml-metadata-blocks.md
@@ -46,3 +46,18 @@ array:
Pandoc (Meta {unMeta = fromList [("array",MetaList [MetaMap (fromList [("foo",MetaInlines [Str "bar"])]),MetaMap (fromList [("bool",MetaBool True)])])]})
[]
```
+```
+% pandoc -s -t native --metadata-file command/yaml-metadata.yaml
+---
+title: document
+---
+^D
+Pandoc (Meta {unMeta = fromList [("other",MetaInlines [Emph [Str "markdown"],Space,Str "value"]),("title",MetaInlines [Str "document"])]})
+[]
+```
+```
+% pandoc -s -t native --metadata-file command/yaml-metadata.yaml -M title=cmdline
+^D
+Pandoc (Meta {unMeta = fromList [("other",MetaInlines [Emph [Str "markdown"],Space,Str "value"]),("title",MetaString "cmdline")]})
+[]
+```
diff --git a/test/command/yaml-metadata.yaml b/test/command/yaml-metadata.yaml
new file mode 100644
index 000000000..9cd0043d3
--- /dev/null
+++ b/test/command/yaml-metadata.yaml
@@ -0,0 +1,4 @@
+---
+title: file
+other: _markdown_ value
+---