Sha256: 75b4be21a96a69130c17665f34d8e78406cf2db4a9d70210a1a568222212ac5b
Contents?: true
Size: 1.8 KB
Versions: 1
Compression:
Stored size: 1.8 KB
Contents
require 'test_helper' context "Bulleted lists (:ulist)" do context "Simple lists" do test "dash elements with no blank lines" do output = render_string("Blah\n====\n- Foo\n- Boo\n- Blech") assert_xpath '//ul', output, 1 assert_xpath '//ul/li', output, 3 end test "dash elements with blank lines" do assert_xpath '//ul/li', render_string("Blah\n====\n- Foo\n\n- Boo\n\n- Blech"), 3 end test "asterisk elements with no blank lines" do assert_xpath '//ul/li', render_string("Blah\n====\n* Foo\n* Boo\n* Blech"), 3 end test "asterisk elements with blank lines" do assert_xpath '//ul/li', render_string("Blah\n====\n* Foo\n\n* Boo\n\n* Blech"), 3 end end context "Nested lists" do test "nested mixed elements (asterisk and dash)" do output = render_string("Blah\n====\n- Foo\n* Boo\n- Blech") assert_xpath '//ul', output, 1 assert_xpath '//ul/li', output, 3 end test "nested elements (2) with asterisks" do output = render_string("Blah\n====\n* Foo\n** Boo\n* Blech") assert_xpath '//ul', output, 2 assert_xpath '//ul/li', output, 3 end test "nested elements (3) with asterisks" do output = render_string("Blah\n====\n* Foo\n** Boo\n*** Snoo\n* Blech") assert_xpath '//ul', output, 3 assert_xpath '//ul/li', output, 4 end test "nested elements (4) with asterisks" do output = render_string("Blah\n====\n* Foo\n** Boo\n*** Snoo\n**** Froo\n* Blech") assert_xpath '//ul', output, 4 assert_xpath '//ul/li', output, 5 end test "nested elements (5) with asterisks" do output = render_string("Blah\n====\n* Foo\n** Boo\n*** Snoo\n**** Froo\n***** Groo\n* Blech") assert_xpath '//ul', output, 5 assert_xpath '//ul/li', output, 6 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asciidoctor-0.0.1 | test/list_elements_test.rb |