From 9be99793b2d7eb4cc28db4cfc615325055d3853f Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 28 Aug 2021 22:14:17 +0200 Subject: 100-increment-decrement: Want to return real start position from incdec In order to set up point moving only when point is on or after the start position of the changed number, I want the second return value from `incdec()` to always give me the correct start position. Currently, it returns 0 as the start position when backwards is on and point is before the first number. It should return the start position of the first number. --- t/100-increment-decrement.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/100-increment-decrement.t b/t/100-increment-decrement.t index 4b7d1a7..181293b 100644 --- a/t/100-increment-decrement.t +++ b/t/100-increment-decrement.t @@ -213,7 +213,7 @@ is_deeply( ); @want = incdec::incdec("sed -n '39,54p' Alice\'s\ Adventures\ in\ Wonderland.txt ", 1, 3, 1); -@got = ("sed -n '40,54p' Alice\'s\ Adventures\ in\ Wonderland.txt ", 0); +@got = ("sed -n '40,54p' Alice\'s\ Adventures\ in\ Wonderland.txt ", 8); is_deeply( \@want, \@got, @@ -236,7 +236,7 @@ is_deeply( 'decrements the first integer with point at position 10 backward' ); -@want = incdec::incdec("sed -n '39,54p' Alice\'s\ Adventures\ in\ Wonderland.txt ", 1, 3, 0); +@want = incdec::incdec("sed -n '39,54p' Alice\'s\ Adventures\ in\ Wonderland.txt ", 1, 3, 8); @got = ("sed -n '40,54p' Alice\'s\ Adventures\ in\ Wonderland.txt ", 8); is_deeply( \@want, -- cgit v1.2.3