diff options
| author | Teddy Wing | 2021-08-22 01:36:02 +0200 |
|---|---|---|
| committer | Teddy Wing | 2021-08-22 01:37:39 +0200 |
| commit | 6a2d1fc08c17b417a25156bdadcaf45d1929ea4f (patch) | |
| tree | f562ad055c682a0655fe24c17616eee06faeedd6 /t/100-increment-decrement.t | |
| parent | b658b4b89b23ec4966642ad544dff43eca14045b (diff) | |
| download | readline-incdec-6a2d1fc08c17b417a25156bdadcaf45d1929ea4f.tar.bz2 | |
100-increment-decrement: Add new second number negative integer tests
The previous negative integer tests worked, but it turns out that when
the negative integer isn't the first one, there's a problem.
Diffstat (limited to 't/100-increment-decrement.t')
| -rw-r--r-- | t/100-increment-decrement.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/100-increment-decrement.t b/t/100-increment-decrement.t index b5b852f..a7927ea 100644 --- a/t/100-increment-decrement.t +++ b/t/100-increment-decrement.t @@ -98,6 +98,18 @@ is( ); is( + incdec::incdec('test 1 -2', 1, 8, 1), + 'test 1 -1', + 'increments the second negative integer with point at position 8 backward' +); + +is( + incdec::incdec('test 1 -2', -1, 8, 1), + 'test 1 -3', + 'decrements the second negative integer with point at position 8 backward' +); + +is( incdec::incdec('test 12', -1), 'test 11', 'decrements the first integer' |
