Skip to content

Commit

Permalink
add test for --metadata-file
Browse files Browse the repository at this point in the history
  • Loading branch information
mb21 committed Sep 15, 2018
1 parent 6aa5fca commit 8ceaaf6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/command/yaml-metadata-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")]})
[]
```
4 changes: 4 additions & 0 deletions test/command/yaml-metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: file
other: _markdown_ value
---

0 comments on commit 8ceaaf6

Please sign in to comment.