aboutsummaryrefslogtreecommitdiffstats
path: root/t/100-increment-decrement.t
diff options
context:
space:
mode:
authorTeddy Wing2021-08-28 22:14:17 +0200
committerTeddy Wing2021-08-28 22:14:17 +0200
commit9be99793b2d7eb4cc28db4cfc615325055d3853f (patch)
treee986dc69deb8e13a546cb6e0a6b7e1f2f2c70e44 /t/100-increment-decrement.t
parentc8fa19d038ed79c640c5164735179611e95520d6 (diff)
downloadreadline-incdec-9be99793b2d7eb4cc28db4cfc615325055d3853f.tar.bz2
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.
Diffstat (limited to 't/100-increment-decrement.t')
-rw-r--r--t/100-increment-decrement.t4
1 files 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,