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:
parent
bd90dc80f2
commit
23f2460e82
1 changed files with 6 additions and 4 deletions
|
@ -1,13 +1,15 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
require 'mkmf'
|
|
||||||
|
|
||||||
class TestRubyMode < Test::Unit::TestCase
|
class TestRubyMode < Test::Unit::TestCase
|
||||||
MISCDIR = File.expand_path("../../../misc", __FILE__)
|
MISCDIR = File.expand_path("../../../misc", __FILE__)
|
||||||
if emacs = find_executable0(ENV["EMACS"] || "emacs")
|
emacs = %W"#{ENV["EMACS"] || "emacs"} -q --no-site-file --batch --load #{MISCDIR}/ruby-mode.el"
|
||||||
EMACS = %W"#{emacs} --quick --batch --load #{MISCDIR}/ruby-mode.el"
|
begin
|
||||||
else
|
IO.popen([*emacs, :err=>[:child, :out]]) {|f| f.read}
|
||||||
|
rescue
|
||||||
EMACS = nil
|
EMACS = nil
|
||||||
|
else
|
||||||
|
EMACS = (emacs if $? and $?.success?)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue