Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 44 lines (34 sloc) 1.165 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
# -*- ruby -*-

require 'autotest/restart'

Autotest.add_hook :initialize do |at|
  at.extra_files << "../../ParseTree/dev/test/pt_testcase.rb"
  at.libs << ":../../ParseTree/dev/lib:../../ParseTree/dev/test:../../sexp_processor/dev/lib"
  at.add_exception 'unit'
  at.add_exception 'coverage'
  at.add_exception '.diff'
  at.add_exception 'coverage.info'

  at.unit_diff = "unit_diff -u -b"

  at.add_mapping(/^lib\/.*\.y$/) do |f, _|
    at.files_matching %r%^test/.*#{File.basename(f, '.y').gsub '_', '_?'}.rb$%
  end

  at.add_mapping(/pt_testcase.rb/) do |f, _|
    at.files_matching(/test_.*rb$/)
  end

  %w(TestEnvironment TestStackState).each do |klass|
    at.extra_class_map[klass] = "test/test_ruby_parser_extras.rb"
  end

  %w(TestRubyParser TestParseTree).each do |klass| # HACK
    at.extra_class_map[klass] = "test/test_ruby_parser.rb"
  end
end

Autotest.add_hook :run_command do |at|
  system "rake parser"
end

class Autotest
  def ruby
    File.expand_path "~/.multiruby/install/1.9.0-0/bin/ruby"
  end
end if ENV['ONENINE']

# require 'autotest/rcov'
# Autotest::RCov.command = 'rcov_info'
# Autotest::RCov.pattern = 'test/test_ruby_lexer.rb'
Something went wrong with that request. Please try again.