aboutsummaryrefslogtreecommitdiffstats
path: root/t/100-increment-decrement.t
diff options
context:
space:
mode:
authorTeddy Wing2021-08-28 15:29:46 +0200
committerTeddy Wing2021-08-28 15:29:46 +0200
commit924e467583354e6faa179518d90e1d4e7ca89743 (patch)
tree1c6d37f9f6778011a78a883eef2c6c6e398dd551 /t/100-increment-decrement.t
parent2eacaa88d83edcca87c2d420b879e86e49564603 (diff)
downloadreadline-incdec-924e467583354e6faa179518d90e1d4e7ca89743.tar.bz2
100-increment-decrement: Add failing test for backward first number
When point is before the first number, that number should be incremented or decremented. This doesn't work correctly with more complex, real world commands.
Diffstat (limited to 't/100-increment-decrement.t')
-rw-r--r--t/100-increment-decrement.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/100-increment-decrement.t b/t/100-increment-decrement.t
index 78feb1f..883a9c2 100644
--- a/t/100-increment-decrement.t
+++ b/t/100-increment-decrement.t
@@ -104,6 +104,12 @@ is(
);
is(
+ incdec::incdec("sed -n '39,54p' Alice\'s\ Adventures\ in\ Wonderland.txt ", 1, 3, 1),
+ "sed -n '40,54p' Alice\'s\ Adventures\ in\ Wonderland.txt ",
+ 'increments the first integer with point at position 3 backward'
+);
+
+is(
incdec::incdec('test -1 ', 1, 7, 1),
'test 0 ',
'increments the negative integer with point at position 7 backward'