Sha256: 073dbd41e072a3cd13f865668b406030160826e1e444ff5327d32f5e23be0e42

Contents?: true

Size: 1.16 KB

Versions: 12

Compression:

Stored size: 1.16 KB

Contents

require 'test/unit'


class TestCommandREs < Test::Unit::TestCase
  base_dir=File.expand_path(File.join(File.dirname(__FILE__), 
                                      '..', '..', '..', '..',
                                      'cli', 'ruby-debug'))
  require File.join(base_dir, 'command')
  require File.join(base_dir, 'commands', 'frame')
  include Debugger
 
  def test_quit
    c = QuitCommand.new(nil)
    assert c.regexp.match('quit')
    assert c.regexp.match('q')
    assert c.regexp.match('quit!')
    assert c.regexp.match('q!')
    assert c.regexp.match('quit unconditionally')
    assert c.regexp.match('exit')
    assert c.regexp.match('exit!')
  end

  def test_up
    c = UpCommand.new(nil)
    assert c.regexp.match('up')
    assert c.regexp.match('up 2')
    assert c.regexp.match('up 2+5')
    assert c.regexp.match('u')
    assert c.regexp.match('u 2')
    assert_equal nil, c.regexp.match('ufoo')
  end

  def test_down
    c = DownCommand.new(nil)
    assert c.regexp.match('down')
    assert c.regexp.match('down 2')
    assert_equal(nil, c.regexp.match('d 2'))
    assert_equal(nil, c.regexp.match('d'))
    assert_equal(nil, c.regexp.match('dow'))
  end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb
debugger-1.0.0 test/cli/commands/unit/regexp.rb
debugger-1.0.0.rc2 test/cli/commands/unit/regexp.rb
debugger-1.0.0.rc1 test/cli/commands/unit/regexp.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb
vim-jar-0.0.3 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb
vim-jar-0.0.2 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb
vim-jar-0.0.1 bundler/ruby/1.8/gems/ruby-debug-0.10.4/test/cli/commands/unit/regexp.rb
ruby-debug-0.10.4 test/cli/commands/unit/regexp.rb