diff options
Diffstat (limited to 'test/iconv/test_option.rb')
-rw-r--r-- | test/iconv/test_option.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/iconv/test_option.rb b/test/iconv/test_option.rb index 8c6df56c8f..b899ba2db1 100644 --- a/test/iconv/test_option.rb +++ b/test/iconv/test_option.rb @@ -2,7 +2,12 @@ require File.join(File.dirname(__FILE__), "utils.rb") class TestIconv::Option < TestIconv def test_ignore_option - return unless Iconv.method_defined? :transliterate? + begin + iconv = Iconv.new('SHIFT_JIS', 'EUC-JP') + iconv.transliterate? + rescue NotImplementedError + return + end iconv = Iconv.new('SHIFT_JIS', 'EUC-JP//ignore') str = iconv.iconv(EUCJ_STR) str << iconv.iconv(nil) @@ -17,7 +22,12 @@ class TestIconv::Option < TestIconv end def test_translit_option - return unless Iconv.method_defined? :transliterate? + begin + iconv = Iconv.new('SHIFT_JIS', 'EUC-JP') + iconv.transliterate? + rescue NotImplementedError + return + end iconv = Iconv.new('SHIFT_JIS', 'EUC-JP//ignore') str = iconv.iconv(EUCJ_STR) str << iconv.iconv(nil) |