summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--test/rexml/test_core.rb11
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fe550356da..3ae5b7c83f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
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)