From 23f2460e820ad8ec99cf81ff39f3e9adce67b15d Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 11 Mar 2011 09:33:56 +0000 Subject: * test/misc/test_ruby_mode.rb (TestRubyMode): try to run emacs if runnable, and get rid of --quick for older versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/misc/test_ruby_mode.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/misc/test_ruby_mode.rb') diff --git a/test/misc/test_ruby_mode.rb b/test/misc/test_ruby_mode.rb index 06c0a3f6f8..4765b7b7af 100644 --- a/test/misc/test_ruby_mode.rb +++ b/test/misc/test_ruby_mode.rb @@ -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" - else + 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 = (emacs if $? and $?.success?) end end -- cgit v1.2.3