aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Tests/Old.hs6
-rw-r--r--test/ipynb/simple.in.native6
-rw-r--r--test/ipynb/simple.ipynb19
-rw-r--r--test/ipynb/simple.out.native6
4 files changed, 29 insertions, 8 deletions
diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs
index f0ffa125c..ea82bc1b5 100644
--- a/test/Tests/Old.hs
+++ b/test/Tests/Old.hs
@@ -192,9 +192,11 @@ tests pandocPath =
"org-select-tags.org" "org-select-tags.native"
]
, testGroup "ipynb"
- [ test' "reader" ["-f", "ipynb", "-t", "native", "-s"]
+ [ test' "reader" ["-f", "ipynb-raw_html-raw_tex+raw_attribute",
+ "-t", "native", "-s"]
"ipynb/simple.ipynb" "ipynb/simple.out.native"
- , test' "writer" ["-f", "native", "-t", "ipynb", "-s"]
+ , test' "writer" ["-f", "native", "-t",
+ "ipynb-raw_html-raw_tex+raw_attribute", "-s"]
"ipynb/simple.in.native" "ipynb/simple.ipynb"
]
]
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."]]]