diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-17 01:28:26 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-17 01:28:26 +0000 |
commit | 5c4cf9bfdfa8afe48c096830787d4e7e6ae7bb23 (patch) | |
tree | c4fe1447f18ac861210664f44e8954270f68af4a /test | |
parent | b7beb63b0b55819a68eb93a96b86ceda9bd8c5a4 (diff) | |
download | ruby-5c4cf9bfdfa8afe48c096830787d4e7e6ae7bb23.tar.gz |
for undefined conversions.
* transcode_data_iso_8859.c: Changed from character constants
('\xC2') to integer contants (0xC2) for shorter files and
better readability; eliminated duplicated tables; changed
from -1 offset to actual UNDEF entry (not yet distinguishing
UNDEF and ILLEGAL correctly).
* test/ruby/test_transcode.rb: added a test for UNDEF conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_transcode.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index a8bc712e94..071b97752a 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -27,6 +27,7 @@ class TestTranscode < Test::Unit::TestCase assert_raise(ArgumentError) { 'abc'.encode!('foo', 'bar') } assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode('foo') } assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode!('foo') } + assert_raise(RuntimeError) { "\xA5".encode('utf-8','iso-8859-3') } end def test_arguments |