aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-04-17 09:29:54 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-04-17 09:29:54 -0400
commitc5d8fab058ee5a9b069b17399a1ef93ce3ca8e0e (patch)
tree00ea9b0094e9c3b912df2b28bfc8f99d19642af8
parentb948ca6db2a02b73aae1f77535cc592fc7b80974 (diff)
downloadpandoc-c5d8fab058ee5a9b069b17399a1ef93ce3ca8e0e.tar.gz
Docx reader tests: Test for combining adjacent code blocks.
-rw-r--r--test/Tests/Readers/Docx.hs4
-rw-r--r--test/docx/adjacent_codeblocks.docxbin0 -> 22437 bytes
-rw-r--r--test/docx/adjacent_codeblocks.native6
3 files changed, 10 insertions, 0 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 4f2ad524a..a02e1f35a 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -291,6 +291,10 @@ tests = [ testGroup "inlines"
"docx/codeblock.docx"
"docx/codeblock.native"
, testCompare
+ "combine adjacent code blocks"
+ "docx/adjacent_codeblocks.docx"
+ "docx/adjacent_codeblocks.native"
+ , testCompare
"dropcap paragraphs"
"docx/drop_cap.docx"
"docx/drop_cap.native"
diff --git a/test/docx/adjacent_codeblocks.docx b/test/docx/adjacent_codeblocks.docx
new file mode 100644
index 000000000..d61fb45d5
--- /dev/null
+++ b/test/docx/adjacent_codeblocks.docx
Binary files differ
diff --git a/test/docx/adjacent_codeblocks.native b/test/docx/adjacent_codeblocks.native
new file mode 100644
index 000000000..ec1e2416e
--- /dev/null
+++ b/test/docx/adjacent_codeblocks.native
@@ -0,0 +1,6 @@
+[Para [Str "Next,",Space,Str "open",Space,Str "the",Space,Str "terminal",Space,Str "window.",Space,Str "Using",Space,Str "the",Space,Str "terminal",Space,Str "window,",Space,Str "run",Space,Str "the",Space,Str "\"ifconfig",Space,Str "-a\"",Space,Str "command",Space,Str "to",Space,Str "list",Space,Str "all",Space,Str "the",Space,Str "interfaces",Space,Str "on",Space,Str "your",Space,Str "system,",Space,Str "as",Space,Str "shown",Space,Str "here."]
+,CodeBlock ("",[],[]) "# ifconfig -a\neth0 Link encap:Ethernet HWaddr 00:0c:29:69:12:7c \n inet addr:172.16.0.108 Bcast:172.16.0.255 Mask:255.255.255.0\n inet6 addr: fc00:660:0:1:20c:29ff:fe69:127c/64 Scope:Global\n inet6 addr: fe80::20c:29ff:fe69:127c/64 Scope:Link\n UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1\n RX packets:9859 errors:0 dropped:0 overruns:0 frame:0\n TX packets:1399 errors:0 dropped:0 overruns:0 carrier:0\n collisions:0 txqueuelen:1000 \n RX bytes:1920894 (1.8 MiB) TX bytes:233088 (227.6 KiB)\n Interrupt:19 Base address:0x2000 \n\nlo Link encap:Local Loopback \n inet addr:127.0.0.1 Mask:255.0.0.0\n inet6 addr: ::1/128 Scope:Host\n UP LOOPBACK RUNNING MTU:65536 Metric:1\n RX packets:372 errors:0 dropped:0 overruns:0 frame:0\n TX packets:372 errors:0 dropped:0 overruns:0 carrier:0\n collisions:0 txqueuelen:0 \n RX bytes:22320 (21.7 KiB) TX bytes:22320 (21.7 KiB)\n\nwlan0 Link encap:Ethernet HWaddr 00:c0:ca:85:00:ba \n UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1\n RX packets:0 errors:0 dropped:0 overruns:0 frame:0\n TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\n collisions:0 txqueuelen:1000 \n RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)"
+,Para [Str "The",Space,Str "ALFA",Space,Str "wireless",Space,Str "card",Space,Str "is",Space,Str "represented",Space,Str "by",Space,Str "the",Space,Str "\"wlan0\"",Space,Str "interface."]
+,Para [Str "In",Space,Str "addition",Space,Str "to",Space,Str "the",Space,Str "interfaces",Space,Str "shown",Space,Str "in",Space,Str "the",Space,Str "ifconfig",Space,Str "output,",Space,Str "there",Space,Str "is",Space,Str "another",Space,Str "interface",Space,Str "known",Space,Str "as",Space,Str "the",Space,Emph [Str "wireless",Space,Str "physical",Space,Str "interface"],Str ".",Space,Str "We",Space,Str "can",Space,Str "identify",Space,Str "this",Space,Str "interface",Space,Str "by",Space,Str "listing",Space,Str "the",Space,Str "contents",Space,Str "of",Space,Str "the",Space,Str "/sys/class/ieee80211",Space,Str "directory,",Space,Str "as",Space,Str "shown."]
+,CodeBlock ("",[],[]) "# ls /sys/class/ieee80211/\nphy0"
+,Para [Str "The",Space,Str "\"phy0\"",Space,Str "interface",Space,Str "is",Space,Str "the",Space,Str "parent",Space,Str "interface",Space,Str "used",Space,Str "to",Space,Str "create",Space,Str "child",Space,Str "interfaces.",Space,Str "Note",Space,Str "that",Space,Str "if",Space,Str "you",Space,Str "unplug",Space,Str "and",Space,Str "replug",Space,Str "the",Space,Str "USB",Space,Str "interface,",Space,Str "the",Space,Str "\"phy\"",Space,Str "interface",Space,Str "number",Space,Str "will",Space,Str "increment",Space,Str "by",Space,Str "one",Space,Str "until",Space,Str "you",Space,Str "reboot",Space,Str "your",Space,Str "system."]]