Using end-n as second index on lreplace broken in 8.6.4
Closed / Fixeda4cb3f06c4fe45aa16c8b12206da3e0d4e67ae27Created 11 years agoUpdated 11 years ago
Descriptionplain2015-06-15 19:58:46
Using end-n as second index for the lreplace command has been broken by 32b6159246574b9480f8.
Example: [lreplace {0 1 2 3 4} 0 end-2] produces: 0 1 2 3 4. Should have been: 3 4
Referenced by1
210979790b[a4cb3f06c4] Fix edge case handling in lreplace. Many more tests. check-in2015-06-18 17:33:52
anonymous (claiming to be aspect)wiki2015-06-16 00:47:35
Oops - error was indeed introduced in [32b615924].
The attached fossil bundle adds the reported case as a test and fixes it.
Corner cases involving end-1, end etc should be exercised more carefully to ensure I haven't missed any other bugs!
anonymous (claiming to be aspect)plain2015-06-16 03:37:06
The attached *-2.bundle replaces the previous bundle, and adds: * more tests, trying to get better edge case coverage for future * a minor documentation tweak The tests should be reviewed to ensure I'm testing (a) for correct behaviour and (b) appropriate cases that mishandled indexing could be prone to fail on.
dgpplain2015-06-18 17:34:38
Patch merged to trunk.
Log in (anonymous is fine) to add a comment.