1require 'test/unit'
2require "-test-/string/string"
3require_relative '../../ruby/envutil'
4
5class Test_StringModifyExpand < Test::Unit::TestCase
6  def test_modify_expand_memory_leak
7    assert_no_memory_leak(["-r-test-/string/string"], <<-PRE, <<-CMD, "rb_str_modify_expand()")
8      s=Bug::String.new
9    PRE
10      size = $initial_size
11      10.times{s.modify_expand!(size)}
12      s.replace("")
13    CMD
14  end
15end
16