aboutsummaryrefslogtreecommitdiffstats
path: root/test/irb/test_debug_cmd.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/irb] Page evaluation result's outputStan Lo2023-11-301-4/+0
| | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/784) * Page evaluation result's output This will make it easier to work with long output that exceeds the terminal's height. * Use consistent TERM in rendering tests This makes sure we get consistent result on all platforms. https://github.com/ruby/irb/commit/4fedce93d3
* [ruby/irb] Support disabling pagerStan Lo2023-11-261-2/+4
| | | | | | | | | | | (https://github.com/ruby/irb/pull/783) With either `IRB.conf[:USE_PAGER] = false` or `--no-pager` commnad line flag. I decided use `--no-pager` instead of `--use-pager` because it matches with Pry and git's command line flags. https://github.com/ruby/irb/commit/df1c3b9042
* [ruby/irb] Improve help/show_cmds message during debuggerStan Lo2023-08-291-0/+33
| | | | | | | | | | | integration (https://github.com/ruby/irb/pull/693) * `help` should display debugger's help during irb:rdbg session * Update `show_cmds`'s output when in irb:rdbg session https://github.com/ruby/irb/commit/4029c2e564
* [ruby/irb] Avoid overriding user's `irb_name` setting in debuggerStan Lo2023-08-211-0/+19
| | | | | | | | | | | | | | integration (https://github.com/ruby/irb/pull/688) * Avoid overriding user's irb_name setting in debugger integration Instead of always setting `irb_name` to `irb:rdbg`, it should respect the user's setting and only append `:rdbg` to it. * Introduce write_rc test helper https://github.com/ruby/irb/commit/2ce7593351
* [ruby/irb] Support seamless integration with ruby/debugStan Lo2023-08-131-11/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/575) * Support native integration with ruby/debug * Prevent using multi-irb and activating debugger at the same time Multi-irb makes a few assumptions: - IRB will manage all threads that host sub-irb sessions - All IRB sessions will be run on the threads created by IRB itself However, when using the debugger these assumptions are broken: - `debug` will freeze ALL threads when it suspends the session (e.g. when hitting a breakpoint, or performing step-debugging). - Since the irb-debug integration runs IRB as the debugger's interface, it will be run on the debugger's thread, which is not managed by IRB. So we should prevent the 2 features from being used at the same time. To do that, we check if the other feature is already activated when executing the commands that would activate the other feature. https://github.com/ruby/irb/commit/d8fb3246be
* [ruby/irb] Skip integration tests in core CIStan Lo2023-08-111-4/+0
| | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/677) We already skipped history integration tests in core CI in #675 due to suspicion on nested IRB sessions don't work on certain operating systems. But after #669, the evaluation integration test also started to fail on some Core CI suites. So, it looks like the integration test setup may not work in Core CI, at least in some suites. Consider `ruby/irb` already has rather sophisticated test suite, I think it's better to skip the integration tests in core CI for now. https://github.com/ruby/irb/commit/6f49b4c108
* [ruby/irb] Store integration tests' envs in an ivarStan Lo2023-08-041-6/+4
| | | | | | (https://github.com/ruby/irb/pull/668) https://github.com/ruby/irb/commit/bbd20445ea
* [ruby/irb] Extract integration testing helpers out of debug commandStan Lo2023-08-021-103/+3
| | | | | | | | | | | tests (https://github.com/ruby/irb/pull/660) The ability to run a test case in a subprocess is useful for testing many other features, like nested IRB sessions. So I think it's worth extracting them into a new test case class. https://github.com/ruby/irb/commit/73b7a895f8
* [ruby/irb] Require `test/lib` helpers from main test helperStan Lo2023-06-021-1/+0
| | | | | | (https://github.com/ruby/irb/pull/595) Because they are handled differently in `ruby/irb` and `ruby/ruby`.
* [ruby/irb] Improve debug command testsStan Lo2023-06-011-8/+2
| | | | | | | | | | | | (https://github.com/ruby/irb/pull/594) * Use require_relative for envutil.rb Requiring test helper files with `require_relative` allows running the tests with `ruby -Itest test/irb/test_debug_cmd.rb` without having to set up the load path. * Replace reline hack with TERM=dumb
* [ruby/irb] Fix Test timedout in test_debug_cmdtomoya ishida2023-05-171-2/+5
| | | | | | | | (https://github.com/ruby/irb/pull/582) * Suppress Reline::IOGate.cursor_pos writing escape sequence in test_debug_cmd * Force use Reline::GeneralIO as Reline::IOGate and remove RUBY_DEBUG_NO_RELINE option for debug test
* [ruby/irb] PTY module is platform dependentNobuyoshi Nakada2022-12-191-1/+6
| | | | https://github.com/ruby/irb/commit/dbb3dc72ff
* [ruby/irb] Fix step command (https://github.com/ruby/irb/pull/477)Stan Lo2022-12-091-1/+3
| | | | | | | | The current `next` pre-command workaround on IRB source stepping moves the location by 1 extra line. A better way is to make `debug` skip IRB frames completely, which is what this commit does. It also fixes the step command's test. The `|` in regexp was not escaped so it was always incorrectly matched.
* [ruby/irb] Kill PTY process after test is finishedStan Lo2022-12-081-1/+33
| | | | | | | (https://github.com/ruby/irb/pull/471) The killing/waiting logic is borrowed from ruby/debug: https://github.com/ruby/debug/blob/ec5ae5aebd61a99dc84028d8dffa8e7e165c1ec6/test/support/test_case.rb#L107-L136
* [ruby/irb] Close leaked pty IOsNobuyoshi Nakada2022-12-051-0/+3
| | | | https://github.com/ruby/irb/commit/cc9b1d7ba8
* [ruby/irb] Disable debug cmd tests based on project structureStan Lo2022-12-021-12/+6
| | | | | | | | | | instead of env (https://github.com/ruby/irb/pull/466) It's hard to find an env var that's universally set in all Ruby CI environments but not in local. Checking gemspec seems to be a better way as `syntax_suggest` already uses it for a while. https://github.com/ruby/syntax_suggest/blob/d8f1bca297a392b80b5d167e2be07cf6ac4feae3/spec/spec_helper.rb#L47
* [ruby/irb] This doesn't work on RubyCI eitherTakashi Kokubun2022-12-021-2/+2
| | | | | | | | | http://rubyci.s3.amazonaws.com/rhel_zlinux/ruby-master/log/20221202T063302Z.fail.html.gz http://rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20221202T053006Z.fail.html.gz http://rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20221202T063002Z.fail.html.gz http://rubyci.s3.amazonaws.com/osx1013/ruby-master/log/20221202T054503Z.fail.html.gz https://github.com/ruby/irb/commit/13c2484d59
* [ruby/irb] Skip debug command tests on ruby/rubyTakashi Kokubun2022-12-021-0/+6
| | | | | | | Stan has said these tests could be excluded if they don't work on ruby/ruby CI. https://github.com/ruby/irb/commit/11e779ecb7
* [ruby/irb] Use the proper ruby command and library pathNobuyoshi Nakada2022-12-021-2/+5
| | | | https://github.com/ruby/irb/commit/1416cc1871
* [ruby/irb] Test debug commands without yamatanoorotiStan Lo2022-12-021-0/+258
(https://github.com/ruby/irb/pull/464) * Add debug command tests that don't require yamatanooroti * Remove debug command related yamatanooroti tests As discussed in https://github.com/ruby/irb/pull/449#pullrequestreview-1187255149, we should avoid adding new tests that need yamatanooroti because it's not maintained by the Ruby org. And since debug commands are now tested in `test/irb/test_debug_cmd.rb`, we don't need these tests anymore. * Test against latest debug gem https://github.com/ruby/irb/commit/78a8aa8834