1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2011-03-11 09:33:56 +00:00
parent bd90dc80f2
commit 23f2460e82

View file

@ -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