diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-10 05:51:28 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-10 05:51:28 +0000 |
commit | 5e2a28d13de0d44852c7b040c17d80387cc0f058 (patch) | |
tree | 1fd028ae62684dcaa343176edc5178c7510765ee /test/ruby/marshaltestlib.rb | |
parent | 143d1d840d18636379c141e425fe79cfe2f0e8bf (diff) | |
download | ruby-5e2a28d13de0d44852c7b040c17d80387cc0f058.tar.gz |
Add test for marshaling regexp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/marshaltestlib.rb')
-rw-r--r-- | test/ruby/marshaltestlib.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/marshaltestlib.rb b/test/ruby/marshaltestlib.rb index 5da7ad95dc..8c55a086af 100644 --- a/test/ruby/marshaltestlib.rb +++ b/test/ruby/marshaltestlib.rb @@ -1,3 +1,4 @@ +# coding: utf-8 module MarshalTestLib # include this module to a Test::Unit::TestCase and definde encode(o) and # decode(s) methods. e.g. @@ -245,6 +246,12 @@ module MarshalTestLib marshal_equal(/a/) marshal_equal(/A/i) marshal_equal(/A/mx) + marshal_equal(/a\u3042/) + marshal_equal(/ać/) + assert_equal(Regexp.new("ć".force_encoding("ASCII-8BIT")), + Marshal.load("\004\b/\b\343\201\202\000")) + assert_equal(/au3042/, Marshal.load("\004\b/\fa\\u3042\000")) + #assert_equal(/au3042/u, Marshal.load("\004\b/\fa\\u3042@")) # spec end def test_regexp_subclass |