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 | 5ea9839f1d6e0e9a0fcd5e4bdec4ea024b2f5f27 (patch) | |
| tree | 71566659bd18779bb751b8c7e35425aac8c38fae /test/iconv | |
| parent | 0ccd61383d89e18b4c9937cf065410d8ee40c2e0 (diff) | |
| download | ruby-5ea9839f1d6e0e9a0fcd5e4bdec4ea024b2f5f27.tar.gz ruby-5ea9839f1d6e0e9a0fcd5e4bdec4ea024b2f5f27.tar.xz ruby-5ea9839f1d6e0e9a0fcd5e4bdec4ea024b2f5f27.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@18745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/iconv')
| -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 8c6df56c8..b899ba2db 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) |
