diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-16 19:33:15 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-16 19:33:15 +0000 |
| commit | 3583d442727ff66814e6cea437d823849946b937 (patch) | |
| tree | aed882f80d4940a1053e56b0747cb95f2689ae2e /test/ruby/test_shift_jis.rb | |
| parent | c61e84fd7b226ec29ff86e16f889a7c82f89b58d (diff) | |
| download | ruby-3583d442727ff66814e6cea437d823849946b937.tar.gz ruby-3583d442727ff66814e6cea437d823849946b937.tar.xz ruby-3583d442727ff66814e6cea437d823849946b937.zip | |
* test/ruby/enc: moved tests for particular encodings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_shift_jis.rb')
| -rw-r--r-- | test/ruby/test_shift_jis.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/test/ruby/test_shift_jis.rb b/test/ruby/test_shift_jis.rb deleted file mode 100644 index f81cb7801..000000000 --- a/test/ruby/test_shift_jis.rb +++ /dev/null @@ -1,27 +0,0 @@ -# vim: set fileencoding=shift_jis - -require "test/unit" - -class TestShiftJIS < Test::Unit::TestCase - def test_mbc_case_fold - assert_match(/(a)(a)\1\2/i, "aaaA") - assert_no_match(/(a)(a)\1\2/i, "aaAA") - end - - def test_property - assert_match(/あ{0}\p{Hiragana}{4}/, "ひらがな") - assert_no_match(/あ{0}\p{Hiragana}{4}/, "カタカナ") - assert_no_match(/あ{0}\p{Hiragana}{4}/, "漢字漢字") - assert_no_match(/あ{0}\p{Katakana}{4}/, "ひらがな") - assert_match(/あ{0}\p{Katakana}{4}/, "カタカナ") - assert_no_match(/あ{0}\p{Katakana}{4}/, "漢字漢字") - assert_raise(RegexpError) { Regexp.new('あ{0}\p{foobarbaz}') } - end - - def test_code_to_mbclen - s = "あいうえお" - s << 0x82a9 - assert_equal("あいうえおか", s) - assert_raise(ArgumentError) { s << 0x82 } - end -end |
