aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2019-10-27 22:39:32 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2019-10-27 23:00:30 +0100
commit909083090a63f65f4e720d210272c4bd6866cbee (patch)
tree688bb79eb4d18f789b39b3ad37d6828d4949a786 /test
parentbef124c98c3f2e9f9a5b1bb23c8bd8b2249a9de6 (diff)
downloadpandoc-909083090a63f65f4e720d210272c4bd6866cbee.tar.gz
Org reader: fix parsing of empty comment lines
Comment lines in Org-mode can be completely empty; both of these line should produce no output: # a comment # The reader used to produce a wrong result for the latter, but ignores that line as well now. Fixes: #5856
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Org/Block.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/Tests/Readers/Org/Block.hs b/test/Tests/Readers/Org/Block.hs
index f5ea66343..35fd4c1fa 100644
--- a/test/Tests/Readers/Org/Block.hs
+++ b/test/Tests/Readers/Org/Block.hs
@@ -73,13 +73,23 @@ tests =
"----- em and en dash" =?>
para "\8212\8211 em and en dash"
- , "Comment Block" =:
+ , testGroup "Comments"
+ [ "Comment Block" =:
T.unlines [ "#+BEGIN_COMMENT"
, "stuff"
, "bla"
, "#+END_COMMENT"] =?>
(mempty::Blocks)
+ , "Comment line" =:
+ T.unlines [ "# this is a comment" ] =?>
+ (mempty :: Blocks)
+
+ , "Empty comment line" =:
+ T.unlines [ " #" ] =?>
+ (mempty :: Blocks)
+ ]
+
, testGroup "Blocks and fragments"
[ "HTML block" =:
T.unlines [ "#+BEGIN_HTML"