aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_markup_to_bs.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 04:28:14 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 04:28:14 +0000
commit1c279a7d2753949c725754e1302f791b76358114 (patch)
tree36aa3bdde250e564445eba5f2e25fcb96bcb6cef /test/rdoc/test_rdoc_markup_to_bs.rb
parentc72f0daa877808e4fa5018b3191ca09d4b97c03d (diff)
downloadruby-1c279a7d2753949c725754e1302f791b76358114.tar.gz
* lib/rdoc*: Updated to RDoc 4.0 (pre-release)
* bin/rdoc: ditto * test/rdoc: ditto * NEWS: Updated with RDoc 4.0 information git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_markup_to_bs.rb')
-rw-r--r--test/rdoc/test_rdoc_markup_to_bs.rb33
1 files changed, 27 insertions, 6 deletions
diff --git a/test/rdoc/test_rdoc_markup_to_bs.rb b/test/rdoc/test_rdoc_markup_to_bs.rb
index 35a9266b5d..f2e6352b69 100644
--- a/test/rdoc/test_rdoc_markup_to_bs.rb
+++ b/test/rdoc/test_rdoc_markup_to_bs.rb
@@ -1,7 +1,4 @@
-require 'rubygems'
-require 'rdoc/markup/text_formatter_test_case'
-require 'rdoc/markup/to_bs'
-require 'minitest/autorun'
+require 'rdoc/test_case'
class TestRDocMarkupToBs < RDoc::Markup::TextFormatterTestCase
@@ -18,6 +15,10 @@ class TestRDocMarkupToBs < RDoc::Markup::TextFormatterTestCase
assert_equal "\n", @to.res.join
end
+ def accept_block_quote
+ assert_equal "> quote\n", @to.res.join
+ end
+
def accept_document
assert_equal "hello\n", @to.res.join
end
@@ -68,7 +69,7 @@ class TestRDocMarkupToBs < RDoc::Markup::TextFormatterTestCase
end
def accept_list_item_end_label
- assert_equal "\n", @to.res.join
+ assert_equal "cat:\n", @to.res.join
assert_equal 0, @to.indent, 'indent'
end
@@ -78,7 +79,7 @@ class TestRDocMarkupToBs < RDoc::Markup::TextFormatterTestCase
end
def accept_list_item_end_note
- assert_equal "\n", @to.res.join
+ assert_equal "cat:\n", @to.res.join
assert_equal 0, @to.indent, 'indent'
end
@@ -252,12 +253,32 @@ class TestRDocMarkupToBs < RDoc::Markup::TextFormatterTestCase
assert_equal "teletype:\n teletype description\n\n", @to.res.join
end
+ def accept_list_item_start_note_multi_description
+ assert_equal "label:\n description one\n\n description two\n\n",
+ @to.res.join
+ end
+
+ def accept_list_item_start_note_multi_label
+ assert_equal "one\ntwo:\n two headers\n\n", @to.res.join
+ end
+
def accept_paragraph_b
skip "No String#chars, upgrade your ruby" unless ''.respond_to? :chars
assert_equal "reg b\bbo\bol\bld\bd \b w\bwo\bor\brd\bds\bs reg\n",
@to.end_accepting
end
+ def accept_paragraph_br
+ skip "No String#chars, upgrade your ruby" unless ''.respond_to? :chars
+ assert_equal "one\ntwo\n", @to.end_accepting
+ end
+
+ def accept_paragraph_break
+ skip "No String#chars, upgrade your ruby" unless ''.respond_to? :chars
+ assert_equal "hello\nworld\n",
+ @to.end_accepting
+ end
+
def accept_paragraph_i
skip "No String#chars, upgrade your ruby" unless ''.respond_to? :chars
assert_equal "reg _\bi_\bt_\ba_\bl_\bi_\bc_\b _\bw_\bo_\br_\bd_\bs reg\n",