From 197189789033b8fb8dce27b4c09a6cffb3672fa2 Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 29 Jan 2012 14:24:05 +0000 Subject: [PATCH] Skip test if locale is not Japanese nor UTF-8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/readline/test_readline.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index 4c301ab504..cc9e5d5f93 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -285,11 +285,13 @@ class TestReadline < Test::Unit::TestCase bug5941 = '[Bug #5941]' completion_case_fold = Readline.completion_case_fold Readline.completion_case_fold = false - locale = Encoding.find("locale") - if locale == Encoding::UTF_8 + case locale = Encoding.find("locale") + when Encoding::UTF_8 enc1 = Encoding::EUC_JP - else + when Encoding::EUC_JP, Encoding::Windows_31J enc1 = Encoding::UTF_8 + else + skip end results = nil Readline.completion_proc = ->(text) {results}