aboutsummaryrefslogtreecommitdiffstats
path: root/test/objspace/test_objspace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/objspace/test_objspace.rb')
-rw-r--r--test/objspace/test_objspace.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index f7f507896e..0394a8a92f 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -229,5 +229,19 @@ class TestObjSpace < Test::Unit::TestCase
dump_my_heap_please
end;
+
+ assert_in_out_err(%w[-robjspace], <<-'end;') do |(output), (error)|
+ def dump_my_heap_please
+ ObjectSpace.trace_object_allocations_start
+ GC.start
+ "TEST STRING".force_encoding("UTF-8")
+ ObjectSpace.dump_all()
+ end
+
+ puts dump_my_heap_please
+ end;
+ skip if /is not supported/ =~ error
+ assert_match(entry, File.read(output))
+ end
end
end