summaryrefslogtreecommitdiff
path: root/test/sections_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/sections_test.rb')
-rw-r--r--test/sections_test.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/sections_test.rb b/test/sections_test.rb
index a2c04c4f..ddfabebe 100644
--- a/test/sections_test.rb
+++ b/test/sections_test.rb
@@ -528,6 +528,30 @@ context 'Sections' do
assert_includes result, '----^^----'
end
+ test 'should not recognize section title that does not contain alphanumeric character' do
+ input = <<~'EOS'
+ !@#$
+ ----
+ EOS
+
+ using_memory_logger do |logger|
+ result = convert_string_to_embedded input
+ assert_css 'h2', result, 0
+ end
+ end
+
+ test 'should not recognize section title that consists of only underscores' do
+ input = <<~'EOS'
+ ____
+ ----
+ EOS
+
+ using_memory_logger do |logger|
+ result = convert_string_to_embedded input
+ assert_css 'h2', result, 0
+ end
+ end
+
test 'should preprocess second line of setext section title' do
input = <<~'EOS'
Section Title