summaryrefslogtreecommitdiff
path: root/test/misc
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-15 03:28:47 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-15 03:28:47 +0000
commit071b8d76f0e920e510ffcb3dc6028ee863112b13 (patch)
tree441c17bd4abaeec7a896a6842e9ee0f21cfd6d8e /test/misc
parentc75c838e1682a636ec7b4220b2a684194842d2b4 (diff)
downloadruby-071b8d76f0e920e510ffcb3dc6028ee863112b13.tar.gz
Run tests only for emacs 23+.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/misc')
-rw-r--r--test/misc/test_ruby_mode.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/misc/test_ruby_mode.rb b/test/misc/test_ruby_mode.rb
index 5723dbdaa3..d654cdc34b 100644
--- a/test/misc/test_ruby_mode.rb
+++ b/test/misc/test_ruby_mode.rb
@@ -3,8 +3,10 @@ require 'tempfile'
class TestRubyMode < Test::Unit::TestCase
MISCDIR = File.expand_path("../../../misc", __FILE__)
- emacs = %W"#{ENV["EMACS"] || "emacs"} -q --no-site-file --batch --load #{MISCDIR}/ruby-mode.el"
+ e = ENV["EMACS"] || "emacs"
+ emacs = %W"#{e} -q --no-site-file --batch --load #{MISCDIR}/ruby-mode.el"
begin
+ raise if IO.popen([e, "--version", :err=>[:child, :out]]) {|f| f.read}[/[0-9]+/].to_i < 23
IO.popen([*emacs, :err=>[:child, :out]]) {|f| f.read}
rescue
EMACS = nil