PageRenderTime 44ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 1ms

/vendor/gems/ruby-debug-0.10.2/test/test-quit.rb

https://github.com/technicalpickles/flockup
Ruby | 30 lines | 16 code | 5 blank | 9 comment | 0 complexity | ae49751b461d9e52059d5b9b3d29f14a MD5 | raw file
Possible License(s): GPL-2.0
  1. #!/usr/bin/env ruby
  2. require 'test/unit'
  3. # begin require 'rubygems' rescue LoadError end
  4. # require 'ruby-debug'; Debugger.start
  5. # Test Quit command
  6. class TestQuit < Test::Unit::TestCase
  7. @@SRC_DIR = File.dirname(__FILE__) unless
  8. defined?(@@SRC_DIR)
  9. require File.join(@@SRC_DIR, 'helper')
  10. include TestHelper
  11. def test_basic
  12. testname='quit'
  13. Dir.chdir(@@SRC_DIR) do
  14. script = File.join('data', testname + '.cmd')
  15. # filter = Proc.new{|got_lines, correct_lines|
  16. # [got_lines[0], correct_lines[0]].each do |s|
  17. # s.sub!(/tdebug.rb:\d+/, 'rdebug:999')
  18. # end
  19. # }
  20. assert_equal(true,
  21. run_debugger(testname,
  22. "--script #{script} -- null.rb"))
  23. end
  24. end
  25. end