diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-20 23:00:01 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-20 23:00:01 +0000 |
commit | 0cae739f2d3038d8d2ac6e8ee51a9a4d926dc9d5 (patch) | |
tree | 71566659bd18779bb751b8c7e35425aac8c38fae /test | |
parent | b9e3f3c129b39bd99b1738dbed4273985c464074 (diff) | |
download | ruby-0cae739f2d3038d8d2ac6e8ee51a9a4d926dc9d5.tar.gz |
* test/iconv/test_option.rb (test_ignore_option): skip if iconv
doesn't have transliterate.
* test/iconv/test_option.rb (test_translit_option): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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) |