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

* test/rexml/test_core.rb

(Tester#test_pretty_format_long_text_finite): skip a test that
  uses long string on small memory system. [ruby-dev:42599]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2010-11-19 13:11:20 +00:00
parent 91c0ff4f7d
commit 54142064c4
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Fri Nov 19 22:09:46 2010 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_core.rb
(Tester#test_pretty_format_long_text_finite): skip a test that
uses long string on small memory system. [ruby-dev:42599]
Fri Nov 19 21:07:06 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/optparse.rb: shell completion support for zsh. based on

View file

@ -1156,7 +1156,16 @@ EOL
long_text = 'aaaa ' * n
xml = "<doc>#{long_text}</doc>"
formatter = REXML::Formatters::Pretty.new
document = REXML::Document.new(xml)
document = nil
begin
document = REXML::Document.new(xml)
rescue REXML::ParseException
skip_message = "skip this test because we can't check Pretty#wrap " +
"works without #<SystemStackError: stack level too deep> on " +
"small memory system. #<RegexpError: failed to allocate memory> " +
"will be raised on the system. See also [ruby-dev:42599]."
return skip_message
end
output = ""
assert_nothing_raised do
formatter.write(document, output)