Skip to content

Commit

Permalink
Revert "Update to release MRI 2.2 tests."
Browse files Browse the repository at this point in the history
This reverts commit 7b90ff4.
  • Loading branch information
headius committed Dec 27, 2014
1 parent 7b90ff4 commit c1be61a
Show file tree
Hide file tree
Showing 239 changed files with 1,506 additions and 4,314 deletions.
1 change: 1 addition & 0 deletions test/mri/-ext-/bug_reporter/test_bug_reporter.rb
@@ -1,5 +1,6 @@
require 'test/unit'
require 'tmpdir'
require_relative "../../ruby/envutil"

class TestBugReporter < Test::Unit::TestCase
def test_bug_reporter_add
Expand Down
1 change: 1 addition & 0 deletions test/mri/-ext-/exception/test_data_error.rb
@@ -1,4 +1,5 @@
require 'test/unit'
require_relative '../../ruby/envutil'

module Bug
class TestException < Test::Unit::TestCase
Expand Down
1 change: 1 addition & 0 deletions test/mri/-ext-/exception/test_ensured.rb
@@ -1,4 +1,5 @@
require 'test/unit'
require_relative '../../ruby/envutil'

module Bug
class Bug7802 < RuntimeError
Expand Down
95 changes: 0 additions & 95 deletions test/mri/-ext-/iseq_load/test_iseq_load.rb

This file was deleted.

1 change: 1 addition & 0 deletions test/mri/-ext-/marshal/test_usrmarshal.rb
@@ -1,4 +1,5 @@
require 'test/unit'
require_relative '../../ruby/envutil'
require '-test-/marshal/usr'

module Bug end
Expand Down
37 changes: 0 additions & 37 deletions test/mri/-ext-/proc/test_bmethod.rb

This file was deleted.

63 changes: 3 additions & 60 deletions test/mri/-ext-/string/test_cstr.rb
Expand Up @@ -33,67 +33,10 @@ def test_wchar_long
len = str.size * n
WCHARS.each do |enc|
s = Bug::String.new(str.encode(enc))*n
assert_nothing_raised(ArgumentError, enc.name) {s.cstr_term}
assert_nothing_raised(ArgumentError) {s.cstr_term}
s.set_len(s.bytesize / 2)
assert_equal(len / 2, s.size, enc.name)
assert_equal(0, s.cstr_term, enc.name)
end
end

def test_wchar_lstrip!
assert_wchars_term_char(" a") {|s| s.lstrip!}
end

def test_wchar_rstrip!
assert_wchars_term_char("a ") {|s| s.rstrip!}
end

def test_wchar_chop!
assert_wchars_term_char("a\n") {|s| s.chop!}
end

def test_wchar_chomp!
assert_wchars_term_char("a\n") {|s| s.chomp!}
end

def test_wchar_aset
assert_wchars_term_char("a"*30) {|s| s[29,1] = ""}
end

def test_wchar_sub!
assert_wchars_term_char("foobar") {|s| s.sub!(/#{"foo".encode(s.encoding)}/, "")}
end

def test_wchar_delete!
assert_wchars_term_char("foobar") {|s| s.delete!("ao".encode(s.encoding))}
end

def test_wchar_squeeze!
assert_wchars_term_char("foo!") {|s| s.squeeze!}
end

def test_wchar_tr!
assert_wchars_term_char("\u{3042}foobar") {|s|
enc = s.encoding
s.tr!("\u{3042}".encode(enc), "c".encode(enc))
}
end

def test_wchar_tr_s!
assert_wchars_term_char("\u{3042}foobar") {|s|
enc = s.encoding
s.tr_s!("\u{3042}".encode(enc), "c".encode(enc))
}
end

def assert_wchars_term_char(str)
result = {}
WCHARS.map do |enc|
s = Bug::String.new(str.encode(enc))
yield s
c = s.cstr_term_char
result[enc] = c if c
assert_equal(len / 2, s.size)
assert_equal(0, s.cstr_term)
end
assert_empty(result)
end
end
1 change: 1 addition & 0 deletions test/mri/-ext-/string/test_modify_expand.rb
@@ -1,5 +1,6 @@
require 'test/unit'
require "-test-/string/string"
require_relative '../../ruby/envutil'

class Test_StringModifyExpand < Test::Unit::TestCase
def test_modify_expand_memory_leak
Expand Down
1 change: 1 addition & 0 deletions test/mri/-ext-/struct/test_member.rb
@@ -1,5 +1,6 @@
require 'test/unit'
require "-test-/struct"
require_relative '../../ruby/envutil'

class Bug::Struct::Test_Member < Test::Unit::TestCase
S = Bug::Struct.new(:a)
Expand Down

0 comments on commit c1be61a

Please sign in to comment.