rr- / urwid_readline

readline text edit for urwid
MIT License
27 stars 11 forks source link

Add tests for setting autocomplete delimiters & support no delimiters #16

Closed neiljp closed 3 years ago

neiljp commented 3 years ago

On exploring a fix for #13, I saw there was already a set_autocomplete_delims.

After an initial refactor of the common compl function into a factory fixture, this PR adds tests for the above method, initially with parametrization demonstrating how the problem observed in zulip-terminal can be resolved (or at least worked around), then expanding it to illustrate behavior when the autocomplete list contains phrases with word separators which are not a space - at this point simply expanding test coverage.

The last commit(s) extend the functionality and test cases to allow setting the autocomplete delimters to be an empty string, ie. no characters - this essentially allows any character in the autocomplete phrases, but matches all text from the start of the text box.

Note that I've left the the last two commits separate for now, but these can squashed before merging. (currently this emphasizes that the existing code is broken when passed an empty string)

neiljp commented 3 years ago

@rr- I squashed the last two commits and updated that commit text. If you've happy with that then based on your approval this should be good to merge.

rr- commented 3 years ago

Thanks @neiljp do you need to get this version released on PyPI or are you planning any further PRs?

neiljp commented 3 years ago

@rr- I don't have any further PRs planned right now, so I'd be happy with having a new release of this :+1:

rr- commented 3 years ago

Sorry for the delay. It's released on PyPI as 0.12 :)

On Tue, Nov 17, 2020 at 10:13:57AM -0800, Neil Pilgrim wrote:

@rr- I don't have any further PRs planned right now, so I'd be happy with having a new release of this 👍

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.*