PR #3455 will fix three of the four remaining issues. The highlights:
I have spent several days creating demanding unit tests for Leo's paste-node and paste-retaining-clones commands. I shall soon write a similar test for the paste-as-template command.
For the first time, we can contemplate changes to all three commands. We can also (for the first time!) test any changes.
The unit tests verify that paste-node and paste-retaining-clones work when the clipboard is in copy-as-json format.
Significant changes
The unit tests prove we can remove the strange save/restore code in fc.getLeoOutlineFromClipBoardRetainingClones and fc.getLeoOutlineFromClipBoard. No amount of theorizing or study could have done the same. As a result, the PR will close #3453.
The paste-node and paste-retaining-clones commands now support the pasted nodes win rule. And yes, the unit tests verify this policy.
To do
The PR will complete #3452, a paste-based undo scheme. I'll write a new unit test for the new code. Note: the two new unit tests perform three cycles of undo/redo, so they will form the basis for testing the new undo scheme.
Summary
PR 3455 adds urgently needed unit tests for complex code that pastes outlines. The PR changes only about a dozen lines of code. All the rest is scaffolding. That's the way it should be.
For the first time, Leo's paste-node-related code rests on a firm foundation.
Edward
The PR will complete #3452, a paste-based undo scheme. I'll write a new unit test for the new code. Note: the two new unit tests perform three cycles of undo/redo, so they will form the basis for testing the new undo scheme.
Summary
PR 3455 adds urgently needed unit tests for complex code that pastes outlines.