From 8ceaaf6d0466a8ee811a2eb1ac0d861f76383fa7 Mon Sep 17 00:00:00 2001 From: mb21 Date: Sat, 15 Sep 2018 16:47:53 +0200 Subject: [PATCH] add test for --metadata-file --- test/command/yaml-metadata-blocks.md | 15 +++++++++++++++ test/command/yaml-metadata.yaml | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 test/command/yaml-metadata.yaml diff --git a/test/command/yaml-metadata-blocks.md b/test/command/yaml-metadata-blocks.md index eae69aa3dd4ed..5b73cff722051 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 0000000000000..9cd0043d37640 --- /dev/null +++ b/test/command/yaml-metadata.yaml @@ -0,0 +1,4 @@ +--- +title: file +other: _markdown_ value +---