aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorBrian Leung <[email protected]>2022-05-20 00:46:16 -0700
committerGitHub <[email protected]>2022-05-20 09:46:16 +0200
commitae8ed408b03688f4ddf6a13d0e55fba9138c6eb9 (patch)
treef17550c3a36cc60171f38b355fc7f956c282f56b /test/command
parented054b4c747a963aeefbd370b450521abd95a06d (diff)
Org reader: support line selection in INCLUDE directives. (#8060)
Diffstat (limited to 'test/command')
-rw-r--r--test/command/6466-beg.hs8
-rw-r--r--test/command/6466-end.hs4
-rw-r--r--test/command/6466-mid.hs10
-rw-r--r--test/command/6466-whole.hs2
-rw-r--r--test/command/6466.md23
5 files changed, 47 insertions, 0 deletions
diff --git a/test/command/6466-beg.hs b/test/command/6466-beg.hs
new file mode 100644
index 000000000..33767968c
--- /dev/null
+++ b/test/command/6466-beg.hs
@@ -0,0 +1,8 @@
+want :: Int
+want = 42
+
+-- DO NOT WANT this; right bound is exclusive
+
+-- DO NOT WANT the below
+doNotWant :: Int
+doNotWant = 999
diff --git a/test/command/6466-end.hs b/test/command/6466-end.hs
new file mode 100644
index 000000000..46dd94772
--- /dev/null
+++ b/test/command/6466-end.hs
@@ -0,0 +1,4 @@
+-- DO NOT WANT
+
+want :: Int
+want = 42
diff --git a/test/command/6466-mid.hs b/test/command/6466-mid.hs
new file mode 100644
index 000000000..fe13ecfa1
--- /dev/null
+++ b/test/command/6466-mid.hs
@@ -0,0 +1,10 @@
+-- DO NOT WANT
+
+want :: Int
+want = 42
+
+-- AVOID EXCLUSIVE RIGHT BOUND
+
+-- DO NOT WANT
+doNotWant :: Int
+doNotWant = 999
diff --git a/test/command/6466-whole.hs b/test/command/6466-whole.hs
new file mode 100644
index 000000000..cd2efb02f
--- /dev/null
+++ b/test/command/6466-whole.hs
@@ -0,0 +1,2 @@
+want :: Int
+want = 42
diff --git a/test/command/6466.md b/test/command/6466.md
new file mode 100644
index 000000000..61a9ccd59
--- /dev/null
+++ b/test/command/6466.md
@@ -0,0 +1,23 @@
+```
+% pandoc -f org -t native
+Stuff
+
+#+INCLUDE: "command/6466-beg.hs" src haskell :lines "-4"
+#+INCLUDE: "command/6466-mid.hs" src haskell :lines "3-6"
+#+INCLUDE: "command/6466-end.hs" src haskell :lines "3-"
+#+INCLUDE: "command/6466-whole.hs" src haskell :lines "-"
+
+More stuff
+^D
+[ Para [ Str "Stuff" ]
+, CodeBlock
+ ( "" , [ "haskell" ] , [] ) "want :: Int\nwant = 42\n\n"
+, CodeBlock
+ ( "" , [ "haskell" ] , [] ) "want :: Int\nwant = 42\n\n"
+, CodeBlock
+ ( "" , [ "haskell" ] , [] ) "want :: Int\nwant = 42\n"
+, CodeBlock
+ ( "" , [ "haskell" ] , [] ) "want :: Int\nwant = 42\n"
+, Para [ Str "More" , Space , Str "stuff" ]
+]
+```