Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* test/ruby/test_require.rb: Remove temporally files in the tests.

* test/ruby/test_rubyoptions.rb: Ditto.

* test/logger/test_logger.rb: Ditto.

* test/psych/test_psych.rb: Ditto.

* test/readline/test_readline.rb: Ditto.

* test/syslog/test_syslog_logger.rb: Ditto.

* test/webrick/test_httpauth.rb: Ditto.

* test/zlib/test_zlib.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit 052c0e67d99552aeb2091d1ae7133465a5aa7291 1 parent 61f50e3
akr akr authored
18 ChangeLog
View
@@ -1,3 +1,21 @@
+Sun Mar 24 11:03:31 2013 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/test_require.rb: Remove temporally files in the tests.
+
+ * test/ruby/test_rubyoptions.rb: Ditto.
+
+ * test/logger/test_logger.rb: Ditto.
+
+ * test/psych/test_psych.rb: Ditto.
+
+ * test/readline/test_readline.rb: Ditto.
+
+ * test/syslog/test_syslog_logger.rb: Ditto.
+
+ * test/webrick/test_httpauth.rb: Ditto.
+
+ * test/zlib/test_zlib.rb: Ditto.
+
Sun Mar 24 05:36:29 2013 Eric Hodel <drbrain@segment7.net>
* lib/rinda/ring.rb: Added documentation for multicast support.
2  test/logger/test_logger.rb
View
@@ -46,7 +46,7 @@ def log_raw(logger, msg_id, *arg, &block)
logger.__send__(msg_id, *arg, &block)
logdev.open
msg = logdev.read
- logdev.close
+ logdev.close(true)
msg
end
1  test/psych/test_psych.rb
View
@@ -68,6 +68,7 @@ def test_dump_file
assert_equal io, Psych.dump(hash, io)
io.rewind
assert_equal Psych.dump(hash), io.read
+ io.close(true)
end
end
2  test/readline/test_readline.rb
View
@@ -396,6 +396,8 @@ def test_modify_text_in_pre_input_hook
Readline.pre_input_hook = nil
rescue NotImplementedError
end
+ stdin.close(true)
+ stdout.close(true)
end
end if !/EditLine|\A4\.3\z/n.match(Readline::VERSION)
6 test/ruby/test_require.rb
View
@@ -26,6 +26,7 @@ def test_require_invalid_shared_object
p :ok
end
INPUT
+ t.close(true)
end
def test_require_too_long_filename
@@ -101,6 +102,7 @@ def test_require_path_home_3
ensure
env_rubypath ? ENV["RUBYPATH"] = env_rubypath : ENV.delete("RUBYPATH")
env_home ? ENV["HOME"] = env_home : ENV.delete("HOME")
+ t.close(true)
end
def test_require_with_unc
@@ -258,6 +260,7 @@ def test_load
INPUT
assert_raise(ArgumentError) { at_exit }
+ t.close(true)
end
def test_load2 # [ruby-core:25039]
@@ -271,6 +274,7 @@ def test_load2 # [ruby-core:25039]
assert_in_out_err([], <<-INPUT, %w("hello"), [])
load(#{ t.path.dump }, true)
INPUT
+ t.close(true)
end
def test_tainted_loadpath
@@ -320,6 +324,8 @@ def test_tainted_loadpath
require "#{ file }"
p :ok
INPUT
+
+ t.close(true)
end
def test_relative
2  test/ruby/test_rubyoptions.rb
View
@@ -528,7 +528,7 @@ def test_segv_test
t.flush
assert_in_out_err(["-e", "$0=ARGV[0]; Process.kill :SEGV, $$", t.path],
"", [], expected_stderr, bug7597, opts)
- t.close
+ t.close(true)
end
def test_DATA
2  test/syslog/test_syslog_logger.rb
View
@@ -85,7 +85,7 @@ def log_raw(msg_id, *arg, &block)
assert_equal true, @logger.__send__(msg_id, *arg, &block)
logdev.open
msg = logdev.read
- logdev.close
+ logdev.close(true)
msg
end
2  test/webrick/test_httpauth.rb
View
@@ -59,6 +59,7 @@ def test_basic_auth2
http.request(g){|res| assert_equal("hoge", res.body, log.call)}
g.basic_auth("webrick", "not super")
http.request(g){|res| assert_not_equal("hoge", res.body, log.call)}
+ tmpfile.close(true)
}
end
@@ -140,6 +141,7 @@ def test_digest_auth
g['Authorization'] = credentials_for_request('webrick', "not super", params)
http.request(g){|res| assert_not_equal("hoge", res.body, log.call)}
end
+ tmpfile.close(true)
}
end
32 test/zlib/test_zlib.rb
View
@@ -439,6 +439,7 @@ def test_to_io
Zlib::GzipReader.open(t.path) do |f|
assert_kind_of(IO, f.to_io)
end
+ t.close(true)
end
def test_crc
@@ -450,6 +451,7 @@ def test_crc
f.read
assert_equal(0x8c736521, f.crc)
end
+ t.close(true)
end
def test_mtime
@@ -468,6 +470,7 @@ def test_mtime
Zlib::GzipReader.open(t.path) do |f|
assert_equal(tim.to_i, f.mtime.to_i)
end
+ t.close(true)
end
def test_level
@@ -478,6 +481,7 @@ def test_level
Zlib::GzipReader.open(t.path) do |f|
assert_equal(Zlib::DEFAULT_COMPRESSION, f.level)
end
+ t.close(true)
end
def test_os_code
@@ -488,6 +492,7 @@ def test_os_code
Zlib::GzipReader.open(t.path) do |f|
assert_equal(Zlib::OS_CODE, f.os_code)
end
+ t.close(true)
end
def test_orig_name
@@ -503,6 +508,7 @@ def test_orig_name
Zlib::GzipReader.open(t.path) do |f|
assert_equal("foobarbazqux", f.orig_name)
end
+ t.close(true)
end
def test_comment
@@ -518,6 +524,7 @@ def test_comment
Zlib::GzipReader.open(t.path) do |f|
assert_equal("foobarbazqux", f.comment)
end
+ t.close(true)
end
def test_lineno
@@ -532,6 +539,7 @@ def test_lineno
assert_equal([1000, "baz\n"], [f.lineno, f.gets])
assert_equal([1001, "qux\n"], [f.lineno, f.gets])
end
+ t.close(true)
end
def test_closed_p
@@ -546,6 +554,7 @@ def test_closed_p
f.close
assert_equal(true, f.closed?)
end
+ t.close(true)
end
def test_sync
@@ -560,6 +569,7 @@ def test_sync
f.sync = false
assert_equal(false, f.sync)
end
+ t.close(true)
end
def test_pos
@@ -570,6 +580,7 @@ def test_pos
gz.flush
assert_equal(3, gz.tell)
end
+ t.close(true)
end
def test_path
@@ -599,6 +610,7 @@ def test_path
Zlib::GzipReader.new(sio) do |f|
assert_raise(NoMethodError) { f.path }
end
+ t.close(true)
end
end
@@ -670,6 +682,7 @@ def test_open
ensure
f.close
end
+ t.close(true)
end
def test_rewind
@@ -682,6 +695,7 @@ def test_rewind
f.rewind
assert_equal("foo", f.read)
end
+ t.close(true)
end
def test_unused
@@ -696,6 +710,7 @@ def test_unused
assert_equal("bar", f.read)
assert_equal(nil, f.unused)
end
+ t.close(true)
end
def test_unused2
@@ -735,6 +750,7 @@ def test_read
assert_raise(ArgumentError) { f.read(-1) }
assert_equal(str, f.read)
end
+ t.close(true)
end
def test_readpartial
@@ -753,6 +769,7 @@ def test_readpartial
assert_raise(ArgumentError) { f.readpartial(-1) }
end
+ t.close(true)
end
def test_getc
@@ -764,6 +781,7 @@ def test_getc
"foobar".each_char {|c| assert_equal(c, f.getc) }
assert_nil(f.getc)
end
+ t.close(true)
end
def test_getbyte
@@ -775,6 +793,7 @@ def test_getbyte
"foobar".each_byte {|c| assert_equal(c, f.getbyte) }
assert_nil(f.getbyte)
end
+ t.close(true)
end
def test_readchar
@@ -786,6 +805,7 @@ def test_readchar
"foobar".each_byte {|c| assert_equal(c, f.readchar.ord) }
assert_raise(EOFError) { f.readchar }
end
+ t.close(true)
end
def test_each_byte
@@ -798,6 +818,7 @@ def test_each_byte
f.each_byte {|c| a << c }
assert_equal("foobar".each_byte.to_a, a)
end
+ t.close(true)
end
def test_gets
@@ -823,6 +844,7 @@ def test_gets
assert_equal("az\n", f.gets(nil, 10))
assert_nil(f.gets)
end
+ t.close(true)
end
def test_gets2
@@ -849,6 +871,7 @@ def test_gets2
assert_equal(ustrs[2][1..-1], f.gets(nil, 20))
assert_nil(f.gets)
end
+ t.close(true)
end
def test_readline
@@ -862,6 +885,7 @@ def test_readline
assert_equal("baz\n", f.readline)
assert_raise(EOFError) { f.readline }
end
+ t.close(true)
end
def test_each
@@ -873,6 +897,7 @@ def test_each
a = ["foo\n", "bar\n", "baz\n"]
f.each {|l| assert_equal(a.shift, l) }
end
+ t.close(true)
end
def test_readlines
@@ -883,6 +908,7 @@ def test_readlines
Zlib::GzipReader.open(t.path) do |f|
assert_equal(["foo\n", "bar\n", "baz\n"], f.readlines)
end
+ t.close(true)
end
def test_reader_wrap
@@ -893,6 +919,7 @@ def test_reader_wrap
f.binmode
assert_equal("foo", Zlib::GzipReader.wrap(f) {|gz| gz.read })
assert_raise(IOError) { f.close }
+ t.close(true)
end
def test_corrupted_header
@@ -923,6 +950,7 @@ def test_encoding
read_size = Zlib::GzipReader.open(t.path) {|gz| gz.read(1024) }
assert_equal(Encoding::ASCII_8BIT, read_size.encoding)
assert_equal(content, read_size)
+ t.close(true)
end
end
@@ -951,6 +979,7 @@ def test_open
assert_equal("bar", Zlib::GzipReader.open(t.path) {|gz| gz.read })
assert_raise(Zlib::StreamError) { Zlib::GzipWriter.open(t.path, 10000) }
+ t.close(true)
end
def test_write
@@ -963,6 +992,7 @@ def test_write
def o.to_s; "bar"; end
Zlib::GzipWriter.open(t.path) {|gz| gz.print(o) }
assert_equal("bar", Zlib::GzipReader.open(t.path) {|gz| gz.read })
+ t.close(true)
end
def test_putc
@@ -972,6 +1002,7 @@ def test_putc
assert_equal("x", Zlib::GzipReader.open(t.path) {|gz| gz.read })
# todo: multibyte char
+ t.close(true)
end
def test_writer_wrap
@@ -980,6 +1011,7 @@ def test_writer_wrap
Zlib::GzipWriter.wrap(t) {|gz| gz.print("foo") }
t.close
assert_equal("foo", Zlib::GzipReader.open(t.path) {|gz| gz.read })
+ t.close(true)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.