Permalink
Browse files

Fix up subcommand mock setup. Small "info files" change.

  • Loading branch information...
rocky committed Sep 4, 2011
1 parent 440accc commit fb4fcbf95a6d2052e5127099ca2f2fab41286689
Showing with 4 additions and 3 deletions.
  1. +3 −1 processor/command/info_subcmd/files.rb
  2. +0 −1 processor/command/info_subcmd/frame.rb
  3. +1 −1 processor/mock.rb
@@ -4,6 +4,7 @@
require 'columnize'
require_relative '../base/subcmd'
require_relative '../../../app/run'
require_relative '../../../app/util'
class Trepan::Subcommand::InfoFiles < Trepan::Subcommand
Trepan::Util::suppress_warnings {
@@ -52,9 +53,10 @@ class Trepan::Subcommand::InfoFiles < Trepan::Subcommand
include Trepanning
def file_list
(LineCache.class_variable_get('@@file_cache').keys +
(LineCache.cached_files +
LineCache.class_variable_get('@@file2file_remap').keys).uniq
end
def complete(prefix)
completions = ['.'] + file_list
Trepan::Complete.complete_token(completions, prefix)
@@ -60,7 +60,6 @@ def run(args)
if __FILE__ == $0
# Demo it.
require_relative '../../mock'
dbgr, cmd = MockDebugger::setup('info')
cmd = MockDebugger::sub_setup(Trepan::Subcommand::InfoFrame, false)
cmd.run(cmd.prefix)
end
View
@@ -92,7 +92,7 @@ def sub_setup(sub_class, run=true)
dbgr, cmd = setup(sub_name[0], false)
cmd.proc.frame_setup(RubyVM::ThreadFrame::current.prev)
cmd.proc.event = 'debugger-call'
sub_cmd = sub_class.new(cmd.proc, cmd)
sub_cmd = sub_class.new(cmd)
sub_cmd.summary_help(sub_cmd)
puts
sub_cmd.run([cmd.name]) if run

0 comments on commit fb4fcbf

Please sign in to comment.