[ruby/rdoc] Fix fragile tests
When the temporary path is long enough, the formatter may fold the path and may hit a hyphen at the end of line, and miscounted. https://github.com/ruby/rdoc/commit/5f46479543
This commit is contained in:
parent
edb83dc3a2
commit
17b63ab6b1
@ -598,7 +598,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||||||
assert_match %r%^= Attributes:%, out
|
assert_match %r%^= Attributes:%, out
|
||||||
assert_match %r%^ attr_accessor attr%, out
|
assert_match %r%^ attr_accessor attr%, out
|
||||||
|
|
||||||
assert_equal 1, out.scan(/-\n/).length, out
|
assert_equal 1, out.scan(/^-{50,}$/).length, out
|
||||||
|
|
||||||
refute_match %r%Foo::Bar#blah%, out
|
refute_match %r%Foo::Bar#blah%, out
|
||||||
end
|
end
|
||||||
@ -622,7 +622,7 @@ class TestRDocRIDriver < RDoc::TestCase
|
|||||||
assert_match %r%^= Attributes:%, out
|
assert_match %r%^= Attributes:%, out
|
||||||
assert_match %r%^ attr_accessor attr%, out
|
assert_match %r%^ attr_accessor attr%, out
|
||||||
|
|
||||||
assert_equal 6, out.scan(/-\n/).length, out
|
assert_equal 6, out.scan(/^-{50,}$/).length, out
|
||||||
|
|
||||||
assert_match %r%Foo::Bar#blah%, out
|
assert_match %r%Foo::Bar#blah%, out
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user