PageRenderTime 61ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/gems/ruby-debug-0.10.2/test/test-break-bad.rb

https://github.com/technicalpickles/flockup
Ruby | 36 lines | 25 code | 7 blank | 4 comment | 0 complexity | b0f5206d681f13e17f28588f3574ec19 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 (mostly) invalid breakpoint commands
  6. class TestBadBreak < 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='break_bad'
  13. Dir.chdir(@@SRC_DIR) do
  14. script = File.join('data', testname + '.cmd')
  15. assert_equal(true,
  16. run_debugger(testname,
  17. "--script #{script} -- gcd.rb 3 5"))
  18. end
  19. end
  20. def test_break_loop
  21. testname='break_loop_bug'
  22. Dir.chdir(@@SRC_DIR) do
  23. script = File.join('data', testname + '.cmd')
  24. assert_equal(true,
  25. run_debugger(testname,
  26. "--script #{script} -- bp_loop_issue.rb"))
  27. end
  28. end
  29. end