Skip to content

Commit c1be61a

Browse files
committed
Revert "Update to release MRI 2.2 tests."
This reverts commit 7b90ff4.
1 parent 7b90ff4 commit c1be61a

File tree

239 files changed

+1506
-4314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+1506
-4314
lines changed

test/mri/-ext-/bug_reporter/test_bug_reporter.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'test/unit'
22
require 'tmpdir'
3+
require_relative "../../ruby/envutil"
34

45
class TestBugReporter < Test::Unit::TestCase
56
def test_bug_reporter_add

test/mri/-ext-/exception/test_data_error.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'test/unit'
2+
require_relative '../../ruby/envutil'
23

34
module Bug
45
class TestException < Test::Unit::TestCase

test/mri/-ext-/exception/test_ensured.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'test/unit'
2+
require_relative '../../ruby/envutil'
23

34
module Bug
45
class Bug7802 < RuntimeError

test/mri/-ext-/iseq_load/test_iseq_load.rb

-95
This file was deleted.

test/mri/-ext-/marshal/test_usrmarshal.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'test/unit'
2+
require_relative '../../ruby/envutil'
23
require '-test-/marshal/usr'
34

45
module Bug end

test/mri/-ext-/proc/test_bmethod.rb

-37
This file was deleted.

test/mri/-ext-/string/test_cstr.rb

+3-60
Original file line numberDiff line numberDiff line change
@@ -33,67 +33,10 @@ def test_wchar_long
3333
len = str.size * n
3434
WCHARS.each do |enc|
3535
s = Bug::String.new(str.encode(enc))*n
36-
assert_nothing_raised(ArgumentError, enc.name) {s.cstr_term}
36+
assert_nothing_raised(ArgumentError) {s.cstr_term}
3737
s.set_len(s.bytesize / 2)
38-
assert_equal(len / 2, s.size, enc.name)
39-
assert_equal(0, s.cstr_term, enc.name)
40-
end
41-
end
42-
43-
def test_wchar_lstrip!
44-
assert_wchars_term_char(" a") {|s| s.lstrip!}
45-
end
46-
47-
def test_wchar_rstrip!
48-
assert_wchars_term_char("a ") {|s| s.rstrip!}
49-
end
50-
51-
def test_wchar_chop!
52-
assert_wchars_term_char("a\n") {|s| s.chop!}
53-
end
54-
55-
def test_wchar_chomp!
56-
assert_wchars_term_char("a\n") {|s| s.chomp!}
57-
end
58-
59-
def test_wchar_aset
60-
assert_wchars_term_char("a"*30) {|s| s[29,1] = ""}
61-
end
62-
63-
def test_wchar_sub!
64-
assert_wchars_term_char("foobar") {|s| s.sub!(/#{"foo".encode(s.encoding)}/, "")}
65-
end
66-
67-
def test_wchar_delete!
68-
assert_wchars_term_char("foobar") {|s| s.delete!("ao".encode(s.encoding))}
69-
end
70-
71-
def test_wchar_squeeze!
72-
assert_wchars_term_char("foo!") {|s| s.squeeze!}
73-
end
74-
75-
def test_wchar_tr!
76-
assert_wchars_term_char("\u{3042}foobar") {|s|
77-
enc = s.encoding
78-
s.tr!("\u{3042}".encode(enc), "c".encode(enc))
79-
}
80-
end
81-
82-
def test_wchar_tr_s!
83-
assert_wchars_term_char("\u{3042}foobar") {|s|
84-
enc = s.encoding
85-
s.tr_s!("\u{3042}".encode(enc), "c".encode(enc))
86-
}
87-
end
88-
89-
def assert_wchars_term_char(str)
90-
result = {}
91-
WCHARS.map do |enc|
92-
s = Bug::String.new(str.encode(enc))
93-
yield s
94-
c = s.cstr_term_char
95-
result[enc] = c if c
38+
assert_equal(len / 2, s.size)
39+
assert_equal(0, s.cstr_term)
9640
end
97-
assert_empty(result)
9841
end
9942
end

test/mri/-ext-/string/test_modify_expand.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'test/unit'
22
require "-test-/string/string"
3+
require_relative '../../ruby/envutil'
34

45
class Test_StringModifyExpand < Test::Unit::TestCase
56
def test_modify_expand_memory_leak

test/mri/-ext-/struct/test_member.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'test/unit'
22
require "-test-/struct"
3+
require_relative '../../ruby/envutil'
34

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

0 commit comments

Comments
 (0)