From 23d8ace77f84aac13185413835377cfe3fc61b94 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 9 Dec 2007 03:12:25 +0000 Subject: * string.c (tr_find): returns true if no characters to be removed is specified. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_m17n.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 542c3d2b0..28f636fc6 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -489,4 +489,9 @@ class TestM17N < Test::Unit::TestCase assert_equal(s.tr("A", "B"), s) assert_equal(s.tr_s("A", "B"), s) end + + def test_squeeze + s = "\xa3\xb0\xa3\xb1\xa3\xb1\xa3\xb3\xa3\xb4".force_encoding("euc-jp") + assert_equal("\xa3\xb0\xa3\xb1\xa3\xb3\xa3\xb4".force_encoding("euc-jp"), s.squeeze) + end end -- cgit