Commit graph

12 commits

Author SHA1 Message Date
Stan Lo
8305681729 [ruby/irb] Require test/lib helpers from main test helper
(https://github.com/ruby/irb/pull/595)

Because they are handled differently in `ruby/irb` and `ruby/ruby`.
2023-06-02 13:54:07 +00:00
Stan Lo
2d2893f206 [ruby/irb] Improve debug command tests
(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
2023-06-01 20:10:13 +00:00
tomoya ishida
264ba0f89a [ruby/irb] Fix Test timedout in test_debug_cmd
(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
2023-05-17 04:42:32 +00:00
Nobuyoshi Nakada
1148636e3d [ruby/irb] PTY module is platform dependent
dbb3dc72ff
2022-12-19 17:49:59 +09:00
Stan Lo
381e128c13 [ruby/irb] Fix step command (https://github.com/ruby/irb/pull/477)
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.
2022-12-09 23:39:17 +00:00
Stan Lo
a87f802f1e [ruby/irb] Kill PTY process after test is finished
(https://github.com/ruby/irb/pull/471)

The killing/waiting logic is borrowed from ruby/debug:

ec5ae5aebd/test/support/test_case.rb (L107-L136)
2022-12-08 19:11:51 +00:00
Nobuyoshi Nakada
74923aaf31 [ruby/irb] Close leaked pty IOs
cc9b1d7ba8
2022-12-05 12:03:57 +00:00
Stan Lo
69fd673b1a [ruby/irb] Disable debug cmd tests based on project structure
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.

d8f1bca297/spec/spec_helper.rb (L47)
2022-12-02 20:43:59 +00:00
Takashi Kokubun
f01bfa8af7 [ruby/irb] This doesn't work on RubyCI either
20221202T063302Z.fail.html.gz
20221202T053006Z.fail.html.gz
20221202T063002Z.fail.html.gz
20221202T054503Z.fail.html.gz

13c2484d59
2022-12-02 07:41:18 +00:00
Takashi Kokubun
7e3b42d008 [ruby/irb] Skip debug command tests on ruby/ruby
Stan has said these tests could be excluded if they don't work on
ruby/ruby CI.

11e779ecb7
2022-12-02 04:43:36 +00:00
Nobuyoshi Nakada
b6c66ead9d [ruby/irb] Use the proper ruby command and library path
1416cc1871
2022-12-02 03:14:51 +00:00
Stan Lo
8abf9e6ad0 [ruby/irb] Test debug commands without yamatanooroti
(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

78a8aa8834
2022-12-02 01:05:22 +00:00