summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-23 20:27:58 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-23 20:31:25 +0900
commit17b63ab6b1a8b9f5af99d3bcdb95a3bb19fdd576 (patch)
tree88a045ca4e63146ca8d77591d5e94119a9f8c652 /test/rdoc
parentedb83dc3a2c374e880e8eb488152872152790e92 (diff)
downloadruby-17b63ab6b1a8b9f5af99d3bcdb95a3bb19fdd576.tar.gz
[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
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb
index 86db812d89..39e6e67759 100644
--- a/test/rdoc/test_rdoc_ri_driver.rb
+++ b/test/rdoc/test_rdoc_ri_driver.rb
@@ -598,7 +598,7 @@ class TestRDocRIDriver < RDoc::TestCase
assert_match %r%^= Attributes:%, 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
end
@@ -622,7 +622,7 @@ class TestRDocRIDriver < RDoc::TestCase
assert_match %r%^= Attributes:%, 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
end