1# encoding:windows-1251 2 3require "test/unit" 4 5class TestWindows1251 < Test::Unit::TestCase 6 def test_windows_1251 7 (0xc0..0xdf).each do |c| 8 c1 = c.chr("windows-1251") 9 c2 = (c + 0x20).chr("windows-1251") 10 assert_match(/^(#{ c1 })\1$/i, c2 + c1) 11 assert_match(/^(#{ c2 })\1$/i, c1 + c2) 12 assert_match(/^[#{ c1 }]+$/i, c2 + c1) 13 assert_match(/^[#{ c2 }]+$/i, c1 + c2) 14 end 15 end 16end 17