Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
4,314 additions
and 1,506 deletions.
- +0 −1 test/mri/-ext-/bug_reporter/test_bug_reporter.rb
- +0 −1 test/mri/-ext-/exception/test_data_error.rb
- +0 −1 test/mri/-ext-/exception/test_ensured.rb
- +95 −0 test/mri/-ext-/iseq_load/test_iseq_load.rb
- +0 −1 test/mri/-ext-/marshal/test_usrmarshal.rb
- +37 −0 test/mri/-ext-/proc/test_bmethod.rb
- +60 −3 test/mri/-ext-/string/test_cstr.rb
- +0 −1 test/mri/-ext-/string/test_modify_expand.rb
- +0 −1 test/mri/-ext-/struct/test_member.rb
- +76 −6 test/mri/-ext-/symbol/test_inadvertent_creation.rb
- +0 −1 test/mri/-ext-/test_bug-3571.rb
- +0 −4 test/mri/-ext-/test_printf.rb
- +0 −1 test/mri/-ext-/test_recursion.rb
- +0 −1 test/mri/-ext-/tracepoint/test_tracepoint.rb
- +0 −1 test/mri/-ext-/win32/test_dln.rb
- +0 −1 test/mri/-ext-/win32/test_fd_setsize.rb
- +6 −1 test/mri/bigdecimal/test_bigdecimal.rb
- +0 −1 test/mri/bigdecimal/test_bigmath.rb
- +0 −1 test/mri/cgi/test_cgi_multipart.rb
- +1 −1 test/mri/dbm/test_dbm.rb
- +10 −0 test/mri/digest/digest/foo.rb
- +61 −2 test/mri/digest/test_digest.rb
- +0 −1 test/mri/drb/drbtest.rb
- +0 −1 test/mri/dtrace/helper.rb
- +19 −0 test/mri/erb/test_erb.rb
- +11 −0 test/mri/erb/test_erb_command.rb
- +3 −1 test/mri/etc/test_etc.rb
- +0 −1 test/mri/fiddle/helper.rb
- +0 −1 test/mri/fiddle/test_function.rb
- +0 −1 test/mri/fiddle/test_handle.rb
- +0 −1 test/mri/fiddle/test_pointer.rb
- +6 −5 test/mri/fileutils/test_fileutils.rb
- +5 −2 test/mri/gdbm/test_gdbm.rb
- +37 −11 test/mri/io/console/test_io_console.rb
- +0 −1 test/mri/irb/test_completion.rb
- +0 −1 test/mri/irb/test_option.rb
- +0 −1 test/mri/irb/test_raise_no_backtrace_exception.rb
- +0 −1 test/mri/json/test_json_generate.rb
- +604 −0 test/mri/lib/envutil.rb
- +21 −0 test/mri/lib/find_executable.rb
- +4 −0 test/mri/lib/leakchecker.rb
- +111 −0 test/mri/lib/memory_status.rb
- +2 −0 test/mri/lib/minitest/unit.rb
- +1 −0 test/mri/lib/test/unit.rb
- +3 −3 test/mri/lib/test/unit/assertions.rb
- +0 −1 test/mri/logger/test_logdevice.rb
- +15 −0 test/mri/matrix/test_matrix.rb
- +43 −0 test/mri/matrix/test_vector.rb
- +0 −1 test/mri/mkmf/test_config.rb
- +72 −60 test/mri/monitor/test_monitor.rb
- +9 −13 test/mri/net/ftp/test_ftp.rb
- +1 −1 test/mri/net/http/test_http.rb
- +59 −0 test/mri/net/http/test_httpresponse.rb
- +41 −1 test/mri/net/http/test_https.rb
- +17 −14 test/mri/net/http/test_https_proxy.rb
- +4 −10 test/mri/net/http/utils.rb
- +224 −221 test/mri/net/imap/test_imap.rb
- +8 −0 test/mri/net/imap/test_imap_response_parser.rb
- +16 −12 test/mri/net/pop/test_pop.rb
- +2 −2 test/mri/objspace/test_objspace.rb
- +112 −35 test/mri/open-uri/test_open-uri.rb
- +103 −36 test/mri/open-uri/test_ssl.rb
- +3 −8 test/mri/openssl/test_asn1.rb
- +1 −1 test/mri/openssl/test_bn.rb
- +1 −1 test/mri/openssl/test_buffering.rb
- +1 −1 test/mri/openssl/test_cipher.rb
- +1 −1 test/mri/openssl/test_config.rb
- +1 −1 test/mri/openssl/test_digest.rb
- +1 −1 test/mri/openssl/test_engine.rb
- +1 −1 test/mri/openssl/test_fips.rb
- +1 −1 test/mri/openssl/test_hmac.rb
- +1 −1 test/mri/openssl/test_ns_spki.rb
- +1 −1 test/mri/openssl/test_ocsp.rb
- +1 −1 test/mri/openssl/test_pair.rb
- +2 −4 test/mri/openssl/test_partial_record_read.rb
- +1 −1 test/mri/openssl/test_pkcs12.rb
- +1 −1 test/mri/openssl/test_pkcs5.rb
- +1 −1 test/mri/openssl/test_pkcs7.rb
- +1 −1 test/mri/openssl/test_pkey_dh.rb
- +1 −1 test/mri/openssl/test_pkey_dsa.rb
- +1 −1 test/mri/openssl/test_pkey_ec.rb
- +1 −1 test/mri/openssl/test_pkey_rsa.rb
- +42 −26 test/mri/openssl/test_ssl.rb
- +43 −32 test/mri/openssl/test_ssl_session.rb
- +1 −1 test/mri/openssl/test_x509cert.rb
- +1 −1 test/mri/openssl/test_x509crl.rb
- +1 −1 test/mri/openssl/test_x509ext.rb
- +1 −1 test/mri/openssl/test_x509name.rb
- +1 −1 test/mri/openssl/test_x509req.rb
- +1 −2 test/mri/openssl/test_x509store.rb
- +60 −65 test/mri/openssl/utils.rb
- +0 −1 test/mri/pathname/test_pathname.rb
- +1 −1 test/mri/psych/json/test_stream.rb
- +1 −1 test/mri/psych/test_json_tree.rb
- +54 −0 test/mri/psych/test_marshalable.rb
- +2 −3 test/mri/rake/helper.rb
- +1 −1 test/mri/rake/support/rakefile_definitions.rb
- +2 −2 test/mri/rake/test_rake_application.rb
- +2 −2 test/mri/rake/test_rake_application_options.rb
- +5 −0 test/mri/rake/test_rake_definitions.rb
- +4 −8 test/mri/rake/test_rake_file_task.rb
- +18 −0 test/mri/rake/test_rake_late_time.rb
- +12 −7 test/mri/rake/test_rake_test_task.rb
- +0 −1 test/mri/rake/test_rake_thread_pool.rb
- +2 −2 test/mri/rdoc/test_rdoc_generator_darkfish.rb
- +56 −0 test/mri/rdoc/test_rdoc_generator_json_index.rb
- +1 −1 test/mri/rdoc/test_rdoc_generator_markup.rb
- +3 −0 test/mri/rdoc/test_rdoc_markup_attribute_manager.rb
- +4 −4 test/mri/rdoc/test_rdoc_markup_heading.rb
- +46 −26 test/mri/rdoc/test_rdoc_markup_to_html.rb
- +8 −7 test/mri/rdoc/test_rdoc_markup_to_html_snippet.rb
- +4 −4 test/mri/rdoc/test_rdoc_markup_to_label.rb
- +13 −5 test/mri/rdoc/test_rdoc_single_class.rb
- +55 −0 test/mri/rdoc/test_rdoc_stats.rb
- +0 −1 test/mri/readline/test_readline.rb
- +83 −67 test/mri/resolv/test_dns.rb
- +114 −47 test/mri/rexml/test_document.rb
- +0 −1 test/mri/rinda/test_rinda.rb
- +6 −2 test/mri/ripper/dummyparser.rb
- +2 −3 test/mri/ripper/test_files.rb
- +8 −1 test/mri/ripper/test_parser_events.rb
- +3 −0 test/mri/ripper/test_ripper.rb
- +26 −0 test/mri/ripper/test_sexp.rb
- +0 −1 test/mri/ruby/test_alias.rb
- +0 −1 test/mri/ruby/test_argf.rb
- +15 −9 test/mri/ruby/test_array.rb
- +3 −4 test/mri/ruby/test_autoload.rb
- +0 −1 test/mri/ruby/test_beginendblock.rb
- +0 −1 test/mri/ruby/test_case.rb
- +0 −1 test/mri/ruby/test_class.rb
- +0 −1 test/mri/ruby/test_comparable.rb
- +12 −6 test/mri/ruby/test_const.rb
- +1 −2 test/mri/ruby/test_continuation.rb
- +0 −1 test/mri/ruby/test_defined.rb
- +19 −10 test/mri/ruby/test_dir.rb
- +0 −1 test/mri/ruby/test_dir_m17n.rb
- +0 −1 test/mri/ruby/test_econv.rb
- +0 −1 test/mri/ruby/test_encoding.rb
- +1 −1 test/mri/ruby/test_enum.rb
- +0 −1 test/mri/ruby/test_enumerator.rb
- +0 −1 test/mri/ruby/test_env.rb
- +9 −1 test/mri/ruby/test_eval.rb
- +71 −13 test/mri/ruby/test_exception.rb
- +2 −3 test/mri/ruby/test_fiber.rb
- +6 −1 test/mri/ruby/test_file.rb
- +15 −4 test/mri/ruby/test_file_exhaustive.rb
- +0 −1 test/mri/ruby/test_flip.rb
- +0 −1 test/mri/ruby/test_float.rb
- +0 −1 test/mri/ruby/test_fnmatch.rb
- +26 −2 test/mri/ruby/test_gc.rb
- +3 −4 test/mri/ruby/test_hash.rb
- +88 −75 test/mri/ruby/test_io.rb
- +16 −1 test/mri/ruby/test_io_m17n.rb
- +17 −7 test/mri/ruby/test_iseq.rb
- +13 −3 test/mri/ruby/test_keyword.rb
- +26 −0 test/mri/ruby/test_lambda.rb
- +0 −1 test/mri/ruby/test_lazy_enumerator.rb
- +10 −1 test/mri/ruby/test_literal.rb
- +8 −1 test/mri/ruby/test_m17n.rb
- +22 −1 test/mri/ruby/test_method.rb
- +7 −4 test/mri/ruby/test_module.rb
- +0 −1 test/mri/ruby/test_numeric.rb
- +19 −5 test/mri/ruby/test_object.rb
- +7 −1 test/mri/ruby/test_objectspace.rb
- +36 −0 test/mri/ruby/test_optimization.rb
- +13 −0 test/mri/ruby/test_pack.rb
- +6 −0 test/mri/ruby/test_parse.rb
- +7 −1 test/mri/ruby/test_proc.rb
- +128 −112 test/mri/ruby/test_process.rb
- +0 −1 test/mri/ruby/test_rand.rb
- +0 −1 test/mri/ruby/test_range.rb
- +2 −2 test/mri/ruby/test_readpartial.rb
- +0 −1 test/mri/ruby/test_refinement.rb
- +0 −1 test/mri/ruby/test_regexp.rb
- +25 −3 test/mri/ruby/test_require.rb
- +42 −4 test/mri/ruby/test_rubyoptions.rb
- +31 −19 test/mri/ruby/test_settracefunc.rb
- +0 −1 test/mri/ruby/test_signal.rb
- +3 −2 test/mri/ruby/test_sprintf.rb
- +13 −1 test/mri/ruby/test_string.rb
- +42 −1 test/mri/ruby/test_struct.rb
- +0 −1 test/mri/ruby/test_super.rb
- +83 −6 test/mri/ruby/test_syntax.rb
- +0 −1 test/mri/ruby/test_system.rb
- +0 −2 test/mri/ruby/test_thread.rb
- +0 −1 test/mri/ruby/test_threadgroup.rb
- +12 −1 test/mri/ruby/test_time.rb
- +1 −1 test/mri/ruby/test_transcode.rb
- +0 −1 test/mri/ruby/test_unicode_escape.rb
- +16 −4 test/mri/ruby/test_variable.rb
- +0 −1 test/mri/ruby/test_weakmap.rb
- +0 −1 test/mri/ruby/test_whileuntil.rb
- +15 −32 test/mri/rubygems/test_gem.rb
- +4 −4 test/mri/rubygems/test_gem_commands_contents_command.rb
- +92 −0 test/mri/rubygems/test_gem_commands_pristine_command.rb
- +10 −6 test/mri/rubygems/test_gem_package_tar_writer.rb
- +25 −1 test/mri/rubygems/test_gem_remote_fetcher.rb
- +29 −1 test/mri/rubygems/test_gem_request_set_lockfile.rb
- +2 −2 test/mri/rubygems/test_gem_resolver_api_specification.rb
- +14 −0 test/mri/rubygems/test_gem_resolver_installer_set.rb
- +14 −0 test/mri/rubygems/test_gem_source.rb
- +50 −1 test/mri/rubygems/test_gem_specification.rb
- +9 −1 test/mri/rubygems/test_gem_stub_specification.rb
- +16 −0 test/mri/rubygems/test_gem_text.rb
- +24 −0 test/mri/rubygems/test_kernel.rb
- +0 −1 test/mri/runner.rb
- +1 −2 test/mri/sdbm/test_sdbm.rb
- +0 −1 test/mri/shell/test_command_processor.rb
- +0 −1 test/mri/test_mathn.rb
- +7 −1 test/mri/test_open3.rb
- +8 −0 test/mri/test_pp.rb
- +0 −1 test/mri/test_pstore.rb
- +0 −1 test/mri/test_pty.rb
- +0 −1 test/mri/test_tempfile.rb
- +85 −77 test/mri/test_time.rb
- +6 −0 test/mri/test_tmpdir.rb
- +0 −1 test/mri/test_tracer.rb
- +13 −0 test/mri/test_tsort.rb
- +11 −3 test/mri/test_unicode_normalize.rb
- +8 −1 test/mri/test_weakref.rb
- +0 −1 test/mri/testunit/test_rake_integration.rb
- +0 −1 test/mri/thread/test_cv.rb
- +0 −1 test/mri/thread/test_queue.rb
- +0 −1 test/mri/uri/test_common.rb
- +21 −3 test/mri/uri/test_generic.rb
- +16 −5 test/mri/webrick/test_cgi.rb
- +29 −10 test/mri/webrick/test_filehandler.rb
- +32 −3 test/mri/webrick/test_httpauth.rb
- +3 −3 test/mri/webrick/test_httpproxy.rb
- +6 −0 test/mri/webrick/test_httpresponse.rb
- +46 −26 test/mri/webrick/test_httpserver.rb
- +60 −21 test/mri/webrick/test_server.rb
- +30 −23 test/mri/webrick/utils.rb
- +1 −1 test/mri/webrick/webrick.cgi
- +1 −1 test/mri/webrick/webrick_long_filename.cgi
- +95 −51 test/mri/win32ole/test_win32ole_event.rb
- +10 −12 test/mri/xmlrpc/test_cookie.rb
- +15 −17 test/mri/xmlrpc/test_webrick_server.rb
- +21 −14 test/mri/xmlrpc/webrick_testing.rb
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,5 @@ | ||
require 'test/unit' | ||
require 'tmpdir' | ||
|
||
class TestBugReporter < Test::Unit::TestCase | ||
def test_bug_reporter_add | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,5 +1,4 @@ | ||
require 'test/unit' | ||
|
||
module Bug | ||
class TestException < Test::Unit::TestCase | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,5 +1,4 @@ | ||
require 'test/unit' | ||
|
||
module Bug | ||
class Bug7802 < RuntimeError | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,95 @@ | ||
require 'test/unit' | ||
|
||
class TestIseqLoad < Test::Unit::TestCase | ||
require '-test-/iseq_load/iseq_load' | ||
ISeq = RubyVM::InstructionSequence | ||
|
||
def test_bug8543 | ||
assert_iseq_roundtrip <<-'end;' | ||
puts "tralivali" | ||
def funct(a, b) | ||
a**b | ||
end | ||
3.times { |i| puts "Hello, world#{funct(2,i)}!" } | ||
end; | ||
end | ||
|
||
def test_case_when | ||
assert_iseq_roundtrip <<-'end;' | ||
def user_mask(target) | ||
target.each_char.inject(0) do |mask, chr| | ||
case chr | ||
when "u" | ||
mask | 04700 | ||
when "g" | ||
mask | 02070 | ||
when "o" | ||
mask | 01007 | ||
when "a" | ||
mask | 07777 | ||
else | ||
raise ArgumentError, "invalid `who' symbol in file mode: #{chr}" | ||
end | ||
end | ||
end | ||
end; | ||
end | ||
|
||
def test_splatsplat | ||
assert_iseq_roundtrip('def splatsplat(**); end') | ||
end | ||
|
||
def test_hidden | ||
assert_iseq_roundtrip('def x(a, (b, *c), d: false); end') | ||
end | ||
|
||
def assert_iseq_roundtrip(src) | ||
a = ISeq.compile(src).to_a | ||
b = ISeq.iseq_load(a).to_a | ||
warn diff(a, b) if a != b | ||
assert_equal a, b | ||
assert_equal a, ISeq.iseq_load(b).to_a | ||
end | ||
|
||
def test_next_in_block_in_block | ||
skip "failing due to stack_max mismatch" | ||
assert_iseq_roundtrip <<-'end;' | ||
3.times { 3.times { next } } | ||
end; | ||
end | ||
|
||
def test_break_ensure | ||
skip "failing due to exception entry sp mismatch" | ||
assert_iseq_roundtrip <<-'end;' | ||
def m | ||
bad = true | ||
while true | ||
begin | ||
break | ||
ensure | ||
bad = false | ||
end | ||
end | ||
end | ||
end; | ||
end | ||
|
||
# FIXME: still failing | ||
def test_require_integration | ||
skip "iseq loader require integration tests still failing" | ||
f = File.expand_path(__FILE__) | ||
# $(top_srcdir)/test/ruby/test_....rb | ||
3.times { f = File.dirname(f) } | ||
Dir[File.join(f, 'ruby', '*.rb')].each do |f| | ||
iseq = ISeq.compile_file(f) | ||
orig = iseq.to_a.freeze | ||
|
||
loaded = ISeq.iseq_load(orig).to_a | ||
if loaded != orig | ||
warn f | ||
warn diff(orig, loaded) | ||
end | ||
#assert_equal orig, loaded | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,5 +1,4 @@ | ||
require 'test/unit' | ||
require '-test-/marshal/usr' | ||
|
||
module Bug end | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,37 @@ | ||
require 'test/unit' | ||
require '-test-/proc' | ||
|
||
class TestProc < Test::Unit::TestCase | ||
class TestBMethod < Test::Unit::TestCase | ||
end | ||
end | ||
|
||
class TestProc::TestBMethod | ||
class Base | ||
def foo(*a) | ||
a | ||
end | ||
end | ||
|
||
class Bound < Base | ||
define_method(:foo, Bug::Proc.make_call_super(42)) | ||
define_method(:receiver, Bug::Proc.make_call_receiver(nil)) | ||
end | ||
|
||
def test_super_in_bmethod | ||
obj = Bound.new | ||
assert_equal([1, 42], obj.foo(1)) | ||
end | ||
|
||
def test_block_super | ||
obj = Bound.new | ||
result = nil | ||
obj.foo(2) {|*a| result = a} | ||
assert_equal([2, 42], result) | ||
end | ||
|
||
def test_receiver_in_bmethod | ||
obj = Bound.new | ||
assert_same(obj, obj.receiver) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,5 @@ | ||
require 'test/unit' | ||
require "-test-/string/string" | ||
|
||
class Test_StringModifyExpand < Test::Unit::TestCase | ||
def test_modify_expand_memory_leak | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,5 @@ | ||
require 'test/unit' | ||
require "-test-/struct" | ||
|
||
class Bug::Struct::Test_Member < Test::Unit::TestCase | ||
S = Bug::Struct.new(:a) | ||
Oops, something went wrong.