ruby-changes:19053
From: nobu <ko1@a...>
Date: Fri, 11 Mar 2011 18:34:03 +0900 (JST)
Subject: [ruby-changes:19053] Ruby:r31091 (trunk): * test/misc/test_ruby_mode.rb (TestRubyMode): try to run emacs if
nobu 2011-03-11 18:33:56 +0900 (Fri, 11 Mar 2011) New Revision: 31091 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31091 Log: * test/misc/test_ruby_mode.rb (TestRubyMode): try to run emacs if runnable, and get rid of --quick for older versions. Modified files: trunk/test/misc/test_ruby_mode.rb Index: test/misc/test_ruby_mode.rb =================================================================== --- test/misc/test_ruby_mode.rb (revision 31090) +++ test/misc/test_ruby_mode.rb (revision 31091) @@ -1,13 +1,15 @@ require 'test/unit' require 'tempfile' -require 'mkmf' class TestRubyMode < Test::Unit::TestCase MISCDIR = File.expand_path("../../../misc", __FILE__) - if emacs = find_executable0(ENV["EMACS"] || "emacs") - EMACS = %W"#{emacs} --quick --batch --load #{MISCDIR}/ruby-mode.el" + emacs = %W"#{ENV["EMACS"] || "emacs"} -q --no-site-file --batch --load #{MISCDIR}/ruby-mode.el" + begin + IO.popen([*emacs, :err=>[:child, :out]]) {|f| f.read} + rescue + EMACS = nil else - EMACS = nil + EMACS = (emacs if $? and $?.success?) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/