diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-03-09 16:53:53 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-03-09 16:53:53 -0800 |
commit | e405d7b5325ca16431ff742660378d831eaad35e (patch) | |
tree | 53c4b168b2c16a3128b8456b0c932050c16ee980 /test/ipynb | |
parent | 4810f300e1bfcca24b5abac007bbd836b16934db (diff) | |
download | pandoc-e405d7b5325ca16431ff742660378d831eaad35e.tar.gz |
Include execution output in ipynb test.
Diffstat (limited to 'test/ipynb')
-rw-r--r-- | test/ipynb/simple.in.native | 6 | ||||
-rw-r--r-- | test/ipynb/simple.ipynb | 19 | ||||
-rw-r--r-- | test/ipynb/simple.out.native | 6 |
3 files changed, 25 insertions, 6 deletions
diff --git a/test/ipynb/simple.in.native b/test/ipynb/simple.in.native index b41400195..cc707877f 100644 --- a/test/ipynb/simple.in.native +++ b/test/ipynb/simple.in.native @@ -6,8 +6,10 @@ Pandoc (Meta {unMeta = fromList [("jupyter",MetaMap (fromList [("nbformat",MetaI [CodeBlock ("",["python"],[]) "print(\"hello\")"] ,Div ("",["cell","markdown"],[]) [Header 2 ("pyout",[],[]) [Str "Pyout"]] -,Div ("",["cell","code"],[]) - [CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"] +,Div ("",["cell","code"],[("execution_count","2")]) + [CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")" + ,Div ("",["output","execute_result"],[("execution_count","2")]) + [RawBlock (Format "html") "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"]] ,Div ("",["cell","markdown"],[("tags","[\"foo\",\"bar\"]")]) [Header 2 ("image",[],[]) [Str "Image"] ,Para [Str "This",Space,Str "image",Space,Image ("",[],[]) [Str "the",Space,Str "moon"] ("lalune.jpg",""),Space,Str "will",Space,Str "be",Space,Str "included",Space,Str "as",Space,Str "a",Space,Str "cell",SoftBreak,Str "attachment."]]] diff --git a/test/ipynb/simple.ipynb b/test/ipynb/simple.ipynb index d9f805fb1..26901db57 100644 --- a/test/ipynb/simple.ipynb +++ b/test/ipynb/simple.ipynb @@ -30,9 +30,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "execution_count": 2, + "metadata": {}, + "data": { + "text/html": [ + "<script>\n", + "console.log(\"hello\");\n", + "</script>\n", + "<b>HTML</b>\n", + "hello" + ] + } + } + ], "source": [ "from IPython.display import HTML\n", "HTML(\"\"\"\n", diff --git a/test/ipynb/simple.out.native b/test/ipynb/simple.out.native index ea96b5917..4c060b82f 100644 --- a/test/ipynb/simple.out.native +++ b/test/ipynb/simple.out.native @@ -6,8 +6,10 @@ Pandoc (Meta {unMeta = fromList [("jupyter",MetaMap (fromList [("nbformat",MetaS [CodeBlock ("",["python"],[]) "print(\"hello\")"] ,Div ("",["cell","markdown"],[]) [Header 2 ("pyout",[],[]) [Str "Pyout"]] -,Div ("",["cell","code"],[]) - [CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"] +,Div ("",["cell","code"],[("execution_count","2")]) + [CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")" + ,Div ("",["output","execute_result"],[("execution_count","2")]) + [RawBlock (Format "html") "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"]] ,Div ("",["cell","markdown"],[("tags","[\"foo\",\"bar\"]")]) [Header 2 ("image",[],[]) [Str "Image"] ,Para [Str "This",Space,Str "image",Space,Image ("",[],[]) [Str "the",Space,Str "moon"] ("lalune.jpg",""),Space,Str "will",Space,Str "be",Space,Str "included",Space,Str "as",Space,Str "a",Space,Str "cell",SoftBreak,Str "attachment."]]] |