1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Sort methods in TestSimpleMarkupAttributeManager

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2007-12-28 06:30:37 +00:00
parent 16ecc7c796
commit 4ddbd24eb3

View file

@ -37,24 +37,10 @@ class TestSimpleMarkupAttributeManager < 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)
assert_equal(["cat"], @am.flow("cat"))
assert_equal(["cat ", crossref("#fred"), " dog"].flatten,
@am.flow("cat #fred dog"))
assert_equal([crossref("#fred"), " dog"].flatten,
@am.flow("#fred dog"))
assert_equal(["cat ", crossref("#fred")].flatten, @am.flow("cat #fred"))
def test_adding
assert_equal(["cat ", @wombat_on, "and", @wombat_off, " dog" ],
@am.flow("cat {and} dog"))
#assert_equal(["cat {and} dog" ], @am.flow("cat \\{and} dog"))
end
def test_basic
@ -143,10 +129,24 @@ class TestSimpleMarkupAttributeManager < Test::Unit::TestCase
@am.flow("\\_cat_<i>dog</i>"))
end
def test_adding
assert_equal(["cat ", @wombat_on, "and", @wombat_off, " dog" ],
@am.flow("cat {and} dog"))
# assert_equal(["cat {and} dog" ], @am.flow("cat \\{and} dog"))
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)
assert_equal(["cat"], @am.flow("cat"))
assert_equal(["cat ", crossref("#fred"), " dog"].flatten,
@am.flow("cat #fred dog"))
assert_equal([crossref("#fred"), " dog"].flatten,
@am.flow("#fred dog"))
assert_equal(["cat ", crossref("#fred")].flatten, @am.flow("cat #fred"))
end
end