Bug #883

Failure: test_handle_special_CROSSREF_no_underscore(TestRDocMarkupToHtmlCrossref)

Added by Kazuhiro NISHIYAMA over 5 years ago. Updated almost 3 years ago.

[ruby-core:20564]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
Category:lib
Target version:1.9.2
ruby -v:ruby 1.9.1 (2008-12-15 revision 20750) [i686-linux] Backport:

Description

=begin
test failed with full path

% ruby-trunk -v
ruby 1.9.1 (2008-12-15 revision 20750) [i686-linux]
% ruby-trunk test/rdoc/testrdocmarkuptohtmlcrossref.rb

nil
Loaded suite test/rdoc/test
rdocmarkuptohtmlcrossref
Started
.
Finished in 0.153602 seconds.

1 tests, 210 assertions, 0 failures, 0 errors, 0 skips
% ruby-trunk $(pwd)/test/rdoc/testrdocmarkuptohtmlcrossref.rb
nil
Loaded suite /home/kazu/wc/ruby-lang/trunk/test/rdoc/test
rdocmarkuptohtmlcrossref
Started
F
Finished in 0.041989 seconds.

1) Failure:
testhandlespecialCROSSREFnounderscore(TestRDocMarkupToHtmlCrossref) [/home/kazu/wc/ruby-lang/trunk/test/rdoc/testrdocmarkuptohtmlcrossref.rb:87]:
Expected " /home/kazu/wc/ruby-lang/trunk/test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ", not " /home/kazu/wc/ruby-lang/trunk/test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ".

1 tests, 29 assertions, 1 failures, 0 errors, 0 skips
%
=end


Related issues

Related to ruby-trunk - Bug #2066: Merge Latest RDoc/Ri Closed 09/09/2009
Related to ruby-trunk - Feature #2635: Unbundle rdoc Rejected 01/23/2010

History

#1 Updated by Eric Hodel over 5 years ago

  • Category set to lib
  • Assignee set to Eric Hodel

=begin
I cannot reproduce:

$ ruby19 -v
ruby 1.9.1 (2008-12-16 revision 20769) [i386-darwin9.5.0]

$ ruby19 test/rdoc/testrdocmarkuptohtmlcrossref.rb
nil
Loaded suite test/rdoc/test
rdocmarkuptohtmlcrossref
Started
.
Finished in 0.078531 seconds.

1 tests, 210 assertions, 0 failures, 0 errors, 0 skips

$ ruby19 $(pwd)/test/rdoc/testrdocmarkuptohtmlcrossref.rb
nil
Loaded suite /Users/drbrain/Work/svn/ruby/trunk/test/rdoc/test
rdocmarkuptohtmlcrossref
Started
.
Finished in 0.081387 seconds.

1 tests, 210 assertions, 0 failures, 0 errors, 0 skips

also, test-all passes for this test:

$ make test-all TESTS=rdoc/testrdocmarkuptohtmlcrossref.rb
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./runruby.rb --extout=.ext -- "./test/runner.rb" rdoc/test
rdocmarkuptohtmlcrossref.rb
nil
Loaded suite ./test/runner
Started
.
Finished in 0.086197 seconds.

1 tests, 210 assertions, 0 failures, 0 errors, 0 skips

=end

#2 Updated by Kazuhiro NISHIYAMA over 5 years ago

=begin
another failure example:

% cd test
% ruby-trunk ../test/rdoc/testrdocmarkuptohtmlcrossref.rb
nil
Loaded suite ../test/rdoc/test
rdocmarkuptohtmlcrossref
Started
F
Finished in 0.058379 seconds.

1) Failure:
testhandlespecialCROSSREFnounderscore(TestRDocMarkupToHtmlCrossref) [../test/rdoc/testrdocmarkuptohtmlcrossref.rb:87]:
Expected " ../test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ", not " ../test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ".

1 tests, 29 assertions, 1 failures, 0 errors, 0 skips
%
=end

#3 Updated by Brian Candler over 5 years ago

=begin

I cannot reproduce:

I can reproduce here (Ubuntu Hardy)

ruby-1.9.1-preview2$ ruby19 -v
ruby 1.9.1 (2008-12-01 revision 20438) [i686-linux]

ruby-1.9.1-preview2$ ruby19 $(pwd)/test/rdoc/testrdocmarkuptohtmlcrossref.rb
Loaded suite /v/build/ruby-1.9.1-preview2/test/rdoc/test
rdocmarkuptohtmlcrossref
Started
F
Finished in 0.046547 seconds.

1) Failure:
testhandlespecialCROSSREFnounderscore(TestRDocMarkupToHtmlCrossref) [/v/build/ruby-1.9.1-preview2/test/rdoc/testrdocmarkuptohtmlcrossref.rb:87]:
Expected " /v/build/ruby-1.9.1-preview2/test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ", not " /v/build/ruby-1.9.1-preview2/test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ".

1 tests, 29 assertions, 1 failures, 0 errors, 0 skips

And here's on another Hardy machine running trunk from yesterday:

ruby-svn$ ruby19 -v
ruby 1.9.1 (2008-12-16 revision 20768) [i686-linux]
brian@mappit:/v/downloads/ruby-svn$ ruby19 test/rdoc/testrdocmarkuptohtmlcrossref.rb
nil
Loaded suite test/rdoc/test
rdocmarkuptohtmlcrossref
Started
.
Finished in 0.528887 seconds.

1 tests, 210 assertions, 0 failures, 0 errors, 0 skips
ruby-svn$ ruby19 $(pwd)/test/rdoc/testrdocmarkuptohtmlcrossref.rb
nil
Loaded suite /v/downloads/ruby-svn/test/rdoc/test
rdocmarkuptohtmlcrossref
Started
F
Finished in 0.089370 seconds.

1) Failure:
testhandlespecialCROSSREFnounderscore(TestRDocMarkupToHtmlCrossref) [/v/downloads/ruby-svn/test/rdoc/testrdocmarkuptohtmlcrossref.rb:87]:
Expected " /v/downloads/ruby-svn/test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ", not " /v/downloads/ruby-svn/test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ".

1 tests, 29 assertions, 1 failures, 0 errors, 0 skips

=end

#4 Updated by Kazuhiro NISHIYAMA about 5 years ago

  • ruby -v set to ruby 1.9.1 (2008-12-15 revision 20750) [i686-linux]

=begin
reported in , failed when path of source tree includes '-'.
=end

#5 Updated by Tomoyuki Chikanaga about 5 years ago

=begin
I've found that test/rdoc/testrdocmarkuptohtml_crossref.rb fails when full-path of source tree
contains '-', like "/usr/local/src/ruby-trunk/".

I have a tiny patch solves this test failure.
I'm not confident it's right way to fix the problem. Please examine it.

===================================================================
--- lib/rdoc/markup/tohtmlcrossref.rb (revision 22068)
+++ lib/rdoc/markup/tohtmlcrossref.rb (working copy)
@@ -65,7 +65,7 @@
# The key thing is that there must be at least
# one special character (period, slash, or
# underscore).
- | [\/\w]+[_\/.][\w\/.]+
+ | [-\/\w]+[_\/.][-\w\/.]+

                    # Things that have markup suppressed
                    | \\[^\s]

=end

#6 Updated by Nobuyoshi Nakada about 5 years ago

=begin
Hi,

At Wed, 17 Dec 2008 00:30:45 +0900,
Kazuhiro NISHIYAMA wrote in :

another failure example:

% cd test
% ruby-trunk ../test/rdoc/testrdocmarkuptohtmlcrossref.rb
nil
Loaded suite ../test/rdoc/test
rdocmarkuptohtmlcrossref
Started
F
Finished in 0.058379 seconds.

1) Failure:
testhandlespecialCROSSREFnounderscore(TestRDocMarkupToHtmlCrossref) [../test/rdoc/testrdocmarkuptohtmlcrossref.rb:87]:
Expected " ../test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ", not " ../test/rdoc/rdocmarkuptohtmlcrossrefreference.rb ".

1 tests, 29 assertions, 1 failures, 0 errors, 0 skips

Assuming the test is correct.

Index: lib/rdoc/markup/tohtmlcrossref.rb
===================================================================
--- lib/rdoc/markup/tohtmlcrossref.rb (revision 22822)
+++ lib/rdoc/markup/tohtmlcrossref.rb (working copy)
@@ -66,5 +66,5 @@ class RDoc::Markup::ToHtmlCrossref < RDo
# one special character (period, slash, or
# underscore).
- | [\/\w]+[_\/.][\w\/.]+
+ | (?:..\/)*[-\/\w]+[_\/.][-\w\/.]+

                    # Things that have markup suppressed

--
Nobu Nakada

=end

#7 Updated by Eric Hodel almost 5 years ago

=begin
I have applied Nobu's patch to RDoc trunk.
=end

#8 Updated by Marc-Andre Lafortune over 4 years ago

  • Status changed from Open to Assigned
  • Target version set to 1.9.2

=begin

=end

#9 Updated by Yui NARUSE about 4 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r26386.
Kazuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF