diff options
Diffstat (limited to 'test/rexml')
-rw-r--r-- | test/rexml/test_core.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/rexml/test_core.rb b/test/rexml/test_core.rb index d9280f6aed..90d83f11a5 100644 --- a/test/rexml/test_core.rb +++ b/test/rexml/test_core.rb @@ -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) |