File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def test_open_without_block
3535
3636 def test_open_with_block
3737 input = "#{ EUCJ_STR } \n " *2
38- output = ""
38+ output = String . new
3939 Iconv . open ( "Shift_JIS" , "EUC-JP" ) do |cd |
4040 input . each_line do |s |
4141 output << cd . iconv ( s )
Original file line number Diff line number Diff line change 11require File . expand_path ( "../utils.rb" , __FILE__ )
22
33class TestIconv ::Option < TestIconv
4- def test_ignore_option
4+ def setup
55 begin
66 iconv = Iconv . new ( 'SHIFT_JIS' , 'EUC-JP' )
77 iconv . transliterate?
88 rescue NotImplementedError
9- return
9+ omit "Iconv option is not implemented"
1010 end
11+ @verbose , $VERBOSE = $VERBOSE, nil
12+ end
13+
14+ def teardown
15+ $VERBOSE = @verbose
16+ end
17+
18+ def test_ignore_option
1119 iconv = Iconv . new ( 'SHIFT_JIS' , 'EUC-JP//ignore' )
1220 str = iconv . iconv ( EUCJ_STR )
1321 str << iconv . iconv ( nil )
@@ -22,12 +30,6 @@ def test_ignore_option
2230 end
2331
2432 def test_translit_option
25- begin
26- iconv = Iconv . new ( 'SHIFT_JIS' , 'EUC-JP' )
27- iconv . transliterate?
28- rescue NotImplementedError
29- return
30- end
3133 iconv = Iconv . new ( 'SHIFT_JIS' , 'EUC-JP//ignore' )
3234 str = iconv . iconv ( EUCJ_STR )
3335 str << iconv . iconv ( nil )
Original file line number Diff line number Diff line change 44class TestIconv < ::Test ::Unit ::TestCase
55 if defined? ( ::Encoding ) and String . method_defined? ( :force_encoding )
66 def self . encode ( str , enc )
7- str . force_encoding ( enc )
7+ str . dup . force_encoding ( enc )
88 end
99 else
1010 def self . encode ( str , enc )
You can’t perform that action at this time.
0 commit comments