Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test debug commands without yamatanooroti #464

Merged
merged 3 commits into from
Dec 2, 2022

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Dec 1, 2022

As discussed in #449, it's better to not rely on yamatanooroti for new tests. So in this PR, I added debug command tests using approach similar to debug's (with pty) and removed the ones added in #449.

Note: There seems to be an issue in debug 1.6.3 that causes delete to fail in Ruby 2.6~3.0 (example), but not 3.1+ (example). Given that it seems addressed in the latest debug, we should test with this version until it's officially released.

@k0kubun
Copy link
Member

k0kubun commented Dec 1, 2022

which adds 2 lines of boilerplate code per-test.

Can we possibly set up an irbrc on setup and remove it on teardown? I'm not sure if we want to add an interface only for tests.

@st0012
Copy link
Member Author

st0012 commented Dec 1, 2022

FWIW, it can also be used by users to make production setup easier: #351 (comment)

Instead of:

heroku run "rails console -- --nomultiline" -a my-app-name

User can set USE_SINGLELINE=true in Heroku's envs panel and just use heroku run "rails c".

But it probably worth a separate discussion. I'll try using rc file for now.

As discussed in ruby#449 (review),
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.
@st0012 st0012 force-pushed the test-debug-commands branch from c12a26c to 43114b6 Compare December 1, 2022 23:37
Copy link
Member

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@k0kubun k0kubun merged commit 78a8aa8 into ruby:master Dec 2, 2022
matzbot pushed a commit to ruby/ruby that referenced this pull request Dec 2, 2022
(ruby/irb#464)

* Add debug command tests that don't require yamatanooroti

* Remove debug command related yamatanooroti tests

As discussed in ruby/irb#449 (review),
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

ruby/irb@78a8aa8834
@st0012 st0012 deleted the test-debug-commands branch December 2, 2022 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants