mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/cross_reference.rb: Fixed matching of C#=== or #===. RDoc
bug #164 * test/rdoc/test_rdoc_cross_reference.rb: Test for above. * lib/rdoc/parser/changelog.rb: Fixed parsing of dates. RDoc bug #165 * test/rdoc/test_rdoc_parser_changelog.rb: Test for above. * lib/rdoc/parser.rb: Fixed parsing multibyte files with incomplete characters at byte 1024. [ruby-trunk - Bug #6393] Fixed handling of -E. [ruby-trunk - Bug #6392] * test/rdoc/test_rdoc_options.rb: Test for above. * test/rdoc/test_rdoc_parser.rb: ditto. * test/rdoc/test_rdoc_parser_c.rb: ditto. * test/rdoc/test_rdoc_parser_changelog.rb: ditto. * test/rdoc/test_rdoc_parser_markdown.rb: ditto. * test/rdoc/test_rdoc_parser_rd.rb: ditto. * test/rdoc/test_rdoc_rdoc.rb: ditto. * lib/rdoc/tom_doc.rb: Fixed parsing of [] in TomDoc arguments list. RDoc bug #167 * test/rdoc/test_rdoc_tom_doc.rb: Test for above. * lib/rdoc.rb: Update version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5a7c4d2a78
commit
f3b24b5b7f
16 changed files with 265 additions and 51 deletions
|
@ -25,11 +25,15 @@ class TestRDocParserChangeLog < RDoc::TestCase
|
|||
def test_class_can_parse
|
||||
parser = RDoc::Parser::ChangeLog
|
||||
|
||||
assert_equal parser, parser.can_parse('ChangeLog')
|
||||
temp_dir do
|
||||
FileUtils.touch 'ChangeLog'
|
||||
assert_equal parser, parser.can_parse('ChangeLog')
|
||||
|
||||
assert_equal parser, parser.can_parse(@tempfile.path)
|
||||
assert_equal parser, parser.can_parse(@tempfile.path)
|
||||
|
||||
assert_equal RDoc::Parser::Ruby, parser.can_parse('ChangeLog.rb')
|
||||
FileUtils.touch 'ChangeLog.rb'
|
||||
assert_equal RDoc::Parser::Ruby, parser.can_parse('ChangeLog.rb')
|
||||
end
|
||||
end
|
||||
|
||||
def test_continue_entry_body
|
||||
|
@ -178,7 +182,9 @@ class TestRDocParserChangeLog < RDoc::TestCase
|
|||
[ 'Tue Dec 4 08:32:10 2012 Eric Hodel <drbrain@segment7.net>',
|
||||
%w[three four]],
|
||||
[ 'Mon Dec 3 20:28:02 2012 Koichi Sasada <ko1@atdot.net>',
|
||||
%w[five six]]]
|
||||
%w[five six]],
|
||||
[ '2008-01-30 H.J. Lu <hongjiu.lu@intel.com>',
|
||||
%w[seven eight]]]
|
||||
|
||||
expected = {
|
||||
'2012-12-04' => [
|
||||
|
@ -189,6 +195,9 @@ class TestRDocParserChangeLog < RDoc::TestCase
|
|||
'2012-12-03' => [
|
||||
['Mon Dec 3 20:28:02 2012 Koichi Sasada <ko1@atdot.net>',
|
||||
%w[five six]]],
|
||||
'2008-01-30' => [
|
||||
['2008-01-30 H.J. Lu <hongjiu.lu@intel.com>',
|
||||
%w[seven eight]]],
|
||||
}
|
||||
|
||||
assert_equal expected, parser.group_entries(entries)
|
||||
|
@ -222,6 +231,25 @@ Other note that will be ignored
|
|||
assert_equal expected, parser.parse_entries
|
||||
end
|
||||
|
||||
def test_parse_entries_bad_time
|
||||
parser = util_parser <<-ChangeLog
|
||||
2008-01-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR libffi/34612
|
||||
* src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when
|
||||
returning struct.
|
||||
|
||||
ChangeLog
|
||||
|
||||
expected = [
|
||||
[ '2008-01-30 H.J. Lu <hongjiu.lu@intel.com>',
|
||||
[ 'src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when ' +
|
||||
'returning struct.']]
|
||||
]
|
||||
|
||||
assert_equal expected, parser.parse_entries
|
||||
end
|
||||
|
||||
def test_parse_entries_gnu
|
||||
parser = util_parser <<-ChangeLog
|
||||
1998-08-17 Richard Stallman <rms@gnu.org>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue