diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-25 02:43:03 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-25 02:43:03 +0000 |
commit | 858362e761a41e7d96efbcb9b38ae815b1e388d7 (patch) | |
tree | b47a0968d921320591f9218bc746e11a7922c53f /test/rdoc/test_rdoc_markup_attribute_manager.rb | |
parent | 00b4a3f9c4aaf5aa038a9530ec515e1718ae1c42 (diff) | |
download | ruby-858362e761a41e7d96efbcb9b38ae815b1e388d7.tar.gz |
Import RDoc 2.2.1 r185
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_markup_attribute_manager.rb')
-rw-r--r-- | test/rdoc/test_rdoc_markup_attribute_manager.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/rdoc/test_rdoc_markup_attribute_manager.rb b/test/rdoc/test_rdoc_markup_attribute_manager.rb index 8ba9d7440a..eea87822a8 100644 --- a/test/rdoc/test_rdoc_markup_attribute_manager.rb +++ b/test/rdoc/test_rdoc_markup_attribute_manager.rb @@ -1,5 +1,6 @@ require "test/unit" require "rdoc/markup/inline" +require "rdoc/markup/to_html_crossref" class TestRDocMarkupAttributeManager < Test::Unit::TestCase @@ -201,24 +202,23 @@ class TestRDocMarkupAttributeManager < Test::Unit::TestCase end def test_special - # class names, variable names, file names, or instance variables - @am.add_special(/( - \b([A-Z]\w+(::\w+)*) - | \#\w+[!?=]? - | \b\w+([_\/\.]+\w+)+[!?=]? - )/x, - :CROSSREF) + @am.add_special(RDoc::Markup::ToHtmlCrossref::CROSSREF_REGEXP, :CROSSREF) - assert_equal(["cat"], @am.flow("cat")) + # + # The apostrophes in "cats'" and "dogs'" suppress the flagging of these + # words as potential cross-references, which is necessary for the unit + # tests. Unfortunately, the markup engine right now does not actually + # check whether a cross-reference is valid before flagging it. + # + assert_equal(["cats'"], @am.flow("cats'")) - assert_equal(["cat ", crossref("#fred"), " dog"].flatten, - @am.flow("cat #fred dog")) + assert_equal(["cats' ", crossref("#fred"), " dogs'"].flatten, + @am.flow("cats' #fred dogs'")) - assert_equal([crossref("#fred"), " dog"].flatten, - @am.flow("#fred dog")) + assert_equal([crossref("#fred"), " dogs'"].flatten, + @am.flow("#fred dogs'")) - assert_equal(["cat ", crossref("#fred")].flatten, @am.flow("cat #fred")) + assert_equal(["cats' ", crossref("#fred")].flatten, @am.flow("cats' #fred")) end end - |