summaryrefslogtreecommitdiff
path: root/test/lists_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2018-09-09 02:18:55 -0600
committerGitHub <noreply@github.com>2018-09-09 02:18:55 -0600
commitcfa34ccfd6441c56cadf52c35c3c225bbcf94271 (patch)
tree4110131185b7d0b22158a94ef849c7dc0fcc65f4 /test/lists_test.rb
parent30e1a48c1c89848f9ce3d910ceb9029d9e176646 (diff)
resolves #2863 only support a single unicode bullet as a list marker (PR #2864)
Diffstat (limited to 'test/lists_test.rb')
-rw-r--r--test/lists_test.rb28
1 files changed, 3 insertions, 25 deletions
diff --git a/test/lists_test.rb b/test/lists_test.rb
index be54dafc..8007ba15 100644
--- a/test/lists_test.rb
+++ b/test/lists_test.rb
@@ -942,35 +942,13 @@ List
assert_css 'li', output, 26
end
- test 'nested elements (5) with unicode bullet' do
+ test 'does not recognize lists with repeating unicode bullets' do
input = <<-EOS
-List
-====
-
-• Foo
•• Boo
-••• Snoo
-•••• Froo
-••••• Groo
-• Blech
EOS
output = render_string input
- assert_xpath '//ul', output, 5
- assert_xpath '(//ul)[1]/li', output, 2
- assert_xpath '((//ul)[1]/li//ul)[1]/li', output, 1
- assert_xpath '(((//ul)[1]/li//ul)[1]/li//ul)[1]/li', output, 1
- assert_xpath '((((//ul)[1]/li//ul)[1]/li//ul)[1]/li//ul)[1]/li', output, 1
- assert_xpath '(((((//ul)[1]/li//ul)[1]/li//ul)[1]/li//ul)[1]/li//ul)[1]/li', output, 1
- end if ::RUBY_MIN_VERSION_1_9
-
- test 'nested arbitrary depth with unicode bullet' do
- input = []
- ('a'..'z').each_with_index do |ch, i|
- input << %(#{'•' * (i + 1)} #{ch})
- end
- output = render_embedded_string input.join(%(\n))
- refute_includes output, '•'
- assert_css 'li', output, 26
+ assert_xpath '//ul', output, 0
+ assert_includes output, '•'
end if ::RUBY_MIN_VERSION_1_9
test "nested ordered elements (2)" do