Skip to content

Commit

Permalink
Debug test
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Aug 21, 2023
1 parent b85375b commit 0601286
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/irb/test_debug_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,17 +298,21 @@ def test_prompt_irb_name_is_kept
@envs['IRBRC'] = @irbrc.path

write_ruby <<~'ruby'
binding.irb
a = 1
def foo
binding.irb
end
foo
ruby

output = run_ruby_file do
type "123"
type "debug"
type "exit"
end

assert_match(/foo\(main\):001> debug/, output)
assert_match(/foo:rdbg\(main\):002> exit/, output)
assert_match(/foo\(main\):002> debug/, output)
assert_match(/foo:rdbg\(main\):003> exit/, output)
ensure
@irbrc&.unlink
end
Expand Down

0 comments on commit 0601286

Please sign in to comment.