ruby-changes:22347
From: usa <ko1@a...>
Date: Mon, 30 Jan 2012 10:40:06 +0900 (JST)
Subject: [ruby-changes:22347] usa:r34395 (trunk): * test/irb/test_completion.rb: skip if cannot load irb/completion
usa 2012-01-30 10:39:52 +0900 (Mon, 30 Jan 2012) New Revision: 34395 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34395 Log: * test/irb/test_completion.rb: skip if cannot load irb/completion (maybe readline does not exist). Modified files: trunk/ChangeLog trunk/test/irb/test_completion.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 34394) +++ ChangeLog (revision 34395) @@ -1,3 +1,8 @@ +Mon Jan 30 10:38:37 2012 NAKAMURA Usaku <usa@r...> + + * test/irb/test_completion.rb: skip if cannot load irb/completion + (maybe readline does not exist). + Sun Jan 29 22:47:19 2012 Yutaka Kanemoto <kanemoto@r...> * tool/config.{guess,sub}: updated to automake-1.11.2. Index: test/irb/test_completion.rb =================================================================== --- test/irb/test_completion.rb (revision 34394) +++ test/irb/test_completion.rb (revision 34395) @@ -4,14 +4,19 @@ module TestIRB class TestCompletion < Test::Unit::TestCase def test_nonstring_module_name - bug5938 = '[ruby-core:42244]' - cmds = %W[-rirb -rirb/completion -e IRB.setup(__FILE__) - -e IRB.conf[:MAIN_CONTEXT]=IRB::Irb.new.context - -e module\sFoo;def\sself.name;//;end;end - -e IRB::InputCompletor::CompletionProc.call("[1].first.") - -- -f --] - status = assert_in_out_err(cmds, "", //, [], bug5938) - assert(status.success?, bug5938) + begin + require "irb/completion" + bug5938 = '[ruby-core:42244]' + cmds = %W[-rirb -rirb/completion -e IRB.setup(__FILE__) + -e IRB.conf[:MAIN_CONTEXT]=IRB::Irb.new.context + -e module\sFoo;def\sself.name;//;end;end + -e IRB::InputCompletor::CompletionProc.call("[1].first.") + -- -f --] + status = assert_in_out_err(cmds, "", //, [], bug5938) + assert(status.success?, bug5938) + rescue LoadError + skip "cannot load irb/completion" + end end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/