summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-05-14 12:45:31 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-05-14 12:45:31 +0200
commitaf4bf91c5925b5c6a7431cef8a7997c16d4c7b2b (patch)
tree4fac2c081457bfcd92a13aeb146119de53903409 /test
parent9d295f4527f894493c61c5e8129b9f8616a7e2b4 (diff)
Org reader: add basic file inclusion mechanism
Support for the `#+INCLUDE:` file inclusion mechanism was added. Recognized include types are *example*, *export*, *src*, and normal org file inclusion. Advanced features like line numbers and level selection are not implemented yet. Closes: #3510
Diffstat (limited to 'test')
-rw-r--r--test/command/3510-export.latex1
-rw-r--r--test/command/3510-src.hs1
-rw-r--r--test/command/3510-subdoc.org5
-rw-r--r--test/command/3510.md20
4 files changed, 27 insertions, 0 deletions
diff --git a/test/command/3510-export.latex b/test/command/3510-export.latex
new file mode 100644
index 000000000..6d8636322
--- /dev/null
+++ b/test/command/3510-export.latex
@@ -0,0 +1 @@
+\emph{Hello} \ No newline at end of file
diff --git a/test/command/3510-src.hs b/test/command/3510-src.hs
new file mode 100644
index 000000000..ad5744b80
--- /dev/null
+++ b/test/command/3510-src.hs
@@ -0,0 +1 @@
+putStrLn outString
diff --git a/test/command/3510-subdoc.org b/test/command/3510-subdoc.org
new file mode 100644
index 000000000..5bcc6678a
--- /dev/null
+++ b/test/command/3510-subdoc.org
@@ -0,0 +1,5 @@
+* Subsection
+
+Included text
+
+Lorem ipsum.
diff --git a/test/command/3510.md b/test/command/3510.md
new file mode 100644
index 000000000..7993db848
--- /dev/null
+++ b/test/command/3510.md
@@ -0,0 +1,20 @@
+See <http://orgmode.org/manual/Include-files.html>
+```
+% pandoc -f org -t native
+Text
+
+#+include: "command/3510-subdoc.org"
+
+#+INCLUDE: "command/3510-src.hs" src haskell
+#+INCLUDE: "command/3510-export.latex" export latex
+
+More text
+^D
+[Para [Str "Text"]
+,Header 1 ("subsection",[],[]) [Str "Subsection"]
+,Para [Str "Included",Space,Str "text"]
+,Plain [Str "Lorem",Space,Str "ipsum."]
+,CodeBlock ("",["haskell"],[]) "putStrLn outString\n"
+,RawBlock (Format "latex") "\\emph{Hello}"
+,Para [Str "More",Space,Str "text"]]
+```