add test for --metadata-file

This commit is contained in:
mb21 2018-09-15 16:47:53 +02:00
parent 6aa5fcac13
commit 5347e9454f
3 changed files with 20 additions and 0 deletions

View file

@ -193,6 +193,7 @@ extra-source-files:
test/command/sub-file-chapter-1.tex test/command/sub-file-chapter-1.tex
test/command/sub-file-chapter-2.tex test/command/sub-file-chapter-2.tex
test/command/bar.tex test/command/bar.tex
test/command/yaml-metadata.yaml
test/command/3510-subdoc.org test/command/3510-subdoc.org
test/command/3510-export.latex test/command/3510-export.latex
test/command/3510-src.hs test/command/3510-src.hs

View file

@ -46,3 +46,18 @@ array:
Pandoc (Meta {unMeta = fromList [("array",MetaList [MetaMap (fromList [("foo",MetaInlines [Str "bar"])]),MetaMap (fromList [("bool",MetaBool True)])])]}) 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")]})
[]
```

View file

@ -0,0 +1,4 @@
---
title: file
other: _markdown_ value
---