summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-04-23 11:54:36 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-04-23 11:54:36 +0200
commit04658c491b94ed851c201f0d298e8dd398f81363 (patch)
tree95c1e374c6748ca41b37d3f11d4e02418a516019 /test
parent51a46b7e31c92c717ca4778df96535b0e492babe (diff)
Org reader: handle line numbering switch for src blocks
The line-numbering switch that can be given to source blocks (`-n` with an start number as an optional parameter) is parsed and translated to a class/key-value combination used by highlighting and other readers and writers.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Org.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Tests/Readers/Org.hs b/test/Tests/Readers/Org.hs
index 48f4989ce..4801bea3a 100644
--- a/test/Tests/Readers/Org.hs
+++ b/test/Tests/Readers/Org.hs
@@ -1556,6 +1556,15 @@ tests =
params = [ ("rundoc-language", "sh"), ("rundoc-noeval", "yes") ]
in codeBlockWith ("", classes, params) "echo $HOME\n"
+ , "Source block with line number switch" =:
+ unlines [ "#+BEGIN_SRC sh -n 10"
+ , ":() { :|:& };:"
+ , "#+END_SRC"
+ ] =?>
+ let classes = [ "bash", "numberLines" ]
+ params = [ ("startFrom", "10") ]
+ in codeBlockWith ("", classes, params) ":() { :|:& };:\n"
+
, "Example block" =:
unlines [ "#+begin_example"
, "A chosen representation of"