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

Add assertion to auto_indent_proc's parameter, add Ctrl-d exit test #574

Merged
merged 2 commits into from
Jul 19, 2023

Conversation

tompng
Copy link
Member

@tompng tompng commented Jul 18, 2023

Reline was passing lines=[nil] to auto_indent_proc when exit with Ctrl-d. This pull request add assertion to auto_indent_proc's parameter in rendering test and add Ctrl-d exit test.

Without #571, test added in this pull request will fail. https://github.com/tompng/reline/actions/runs/5592504740/jobs/10225040010

I think there are several bug that wrong byte_pointer is passed to auto_indent_proc.
Adding a strict assertion for byte_pointer will make many test fail, so I added a loose assertion for now.

test/reline/yamatanooroti/multiline_repl Outdated Show resolved Hide resolved
test/reline/yamatanooroti/multiline_repl Outdated Show resolved Hide resolved
@tompng tompng force-pushed the auto_indent_proc_assertion branch from e3c31cc to fe276df Compare July 19, 2023 06:45
@tompng tompng merged commit 46db711 into ruby:master Jul 19, 2023
30 checks passed
@tompng tompng deleted the auto_indent_proc_assertion branch July 19, 2023 13:31
matzbot pushed a commit to ruby/ruby that referenced this pull request Jul 19, 2023
Ctrl-d exit test
(ruby/reline#574)

* Add auto_indent_proc's parameter assertion in multiline_repl

* Add rendering test for Ctrl-d exit

ruby/reline@46db71132a
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