Project

General

Profile

Bug #6965 ยป fix_test_pstore.patch

h.shirosaki (Hiroshi Shirosaki), 09/03/2012 01:00 AM

View differences:

test/ruby/envutil.rb
74 74
      return stdout, stderr, status
75 75
    end
76 76
  ensure
77
    [in_c, in_p, out_c, out_p, err_c, err_p].each do |io|
78
      io.close if io && !io.closed?
79
    end
80 77
    [th_stdout, th_stderr].each do |th|
81 78
      (th.kill; th.join) if th
82 79
    end
80
    [in_c, in_p, out_c, out_p, err_c, err_p].each do |io|
81
      io.close if io && !io.closed?
82
    end
83 83
  end
84 84
  module_function :invoke_ruby
85 85

  
test/test_pstore.rb
120 120
  def test_pstore_files_are_accessed_as_binary_files
121 121
    bug5311 = '[ruby-core:39503]'
122 122
    n = 128
123
    assert_in_out_err(["-Eutf-8:utf-8", "-rpstore", "-", @pstore_file], <<-SRC, [bug5311], [], bug5311)
123
    assert_in_out_err(["-Eutf-8:utf-8", "-rpstore", "-", @pstore_file], <<-SRC, [bug5311], [], bug5311, timeout: 15)
124 124
      @pstore = PStore.new(ARGV[0])
125 125
      (1..#{n}).each do |i|
126 126
        @pstore.transaction {@pstore["Key\#{i}"] = "value \#{i}"}