aboutsummaryrefslogtreecommitdiff
path: root/test/ipynb
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-03-09 16:53:53 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-03-09 16:53:53 -0800
commite405d7b5325ca16431ff742660378d831eaad35e (patch)
tree53c4b168b2c16a3128b8456b0c932050c16ee980 /test/ipynb
parent4810f300e1bfcca24b5abac007bbd836b16934db (diff)
downloadpandoc-e405d7b5325ca16431ff742660378d831eaad35e.tar.gz
Include execution output in ipynb test.
Diffstat (limited to 'test/ipynb')
-rw-r--r--test/ipynb/simple.in.native6
-rw-r--r--test/ipynb/simple.ipynb19
-rw-r--r--test/ipynb/simple.out.native6
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."]]]