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

Fix irb_test prompt assertion failure #1100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tompng
Copy link
Member

@tompng tompng commented May 3, 2024

After changing IRB's behavior with TERM=dumb in ruby/irb#907, test_irb_command_switches_console_to_irb and test_irb_console_config_activates_irb began failing. This pull request fixes it.

With a workaround ruby/irb#943, test does not fail now.

Description

As described in def assert_raw_line_text comment, assert_line_text is not suitable for testing IRB's prompt.

# assert_line_text ignores the prompt line, so we can't use it to assert the prompt transition
# assert_raw_line_text is a workaround for that
def assert_raw_line_text(expectation)

The test was passing before because Reline prints redundant output when TERM is set to dumb, which was problematic while running IRB in emacs shell.

@dgutov
Copy link

dgutov commented Sep 24, 2024

Any chance of this being merged?

It's a change to the test suite, seems like that's safe enough.

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