pass regression test by modifying 'SearchList.backtrackRange' function. The modification that worked was swapping two if-statements around: first we check if the string position is 0 (and loop to check the previous string if so); in the else case, we check if the searchPos <= 1 (which signals for us to exit backtracking). Swapping the order of the if-statements means that, when we exit the loop, we always exit with string that is at this position.

This commit is contained in:
2025-09-27 12:40:28 +01:00
parent 39db9c652e
commit d9380bcb64
2 changed files with 3 additions and 7 deletions

View File

@@ -64,10 +64,6 @@ struct
(* move and then delete twice *)
val app = TestUtils.updateMany (app, "edede")
val s = LineGap.toString (#buffer app)
val s = String.toCString s ^ "\n"
val () = print s
in
Expect.isTrue true
end)