debug icon indicating copy to clipboard operation
debug copied to clipboard

Fix irb_test prompt assertion failure

Open tompng opened this issue 1 year ago • 1 comments

After changing IRB's behavior with TERM=dumb in https://github.com/ruby/irb/pull/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 https://github.com/ruby/irb/pull/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.

tompng avatar May 03 '24 04:05 tompng