It turns out the '-m pdb' workaround for the readline crash does work for
me running unit tests.

I decided I wanted to follow the good practice of adding a failing unit
test which exposes the bug and then show after the fix that same test
passes. I discovered there are already unit tests for other group undo
commands like convertAllBlanks and convertAllTabs and I wondered how those
tests were passing. It turns out all the undo/redo tests start with a fresh
undo stack. The off-by-one error of this bug causes the bead index to be -1
instead of 0. But for a single element list array, indices -1 and 0 point
to the same list element. So the group redo will always function properly
when it is the only item on the list.

In order to duplicate the bug, I will need to write a test containing
multiple commands. I might be out of time for this for a few days, but I
plan to tackle it when I get a chance.

On Wed, Aug 21, 2019 at 7:45 AM Brian Theado <[email protected]> wrote:

> Sure, I'll do that or figure out the segfault issue sometime this week.
>
> On Tue, Aug 20, 2019 at 7:26 AM Edward K. Ream <[email protected]>
> wrote:
>
>> Unfortunately, I'm not able to run unit tests without getting a segfault.
>>>
>> Alright.  Create a new branch, and I'll run the unit tests there.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAO5X8Cxs_P3MHsYWw1eKC9tSNZug9XexBPezsOk0aR%2BqBt7mVQ%40mail.gmail.com.

Reply via email to