diff options
| author | Teddy Wing | 2021-08-21 20:56:54 +0200 |
|---|---|---|
| committer | Teddy Wing | 2021-08-21 20:56:54 +0200 |
| commit | 9ef2e03beda0e9084a8d871ab433ffdd2b0a70fc (patch) | |
| tree | 3d93f746db153f81c72e936e4e244da8c4d9f5d2 /t/100-increment-decrement.t | |
| parent | 546cc5f99bbff15b8ad5b76000baf86258de812b (diff) | |
| download | readline-incdec-9ef2e03beda0e9084a8d871ab433ffdd2b0a70fc.tar.bz2 | |
100-increment-decrement: Doesn't work for negative numbers
Our pattern matcher doesn't increment or decrement negative numbers
because it doesn't look for a "-" prefix.
Diffstat (limited to 't/100-increment-decrement.t')
| -rw-r--r-- | t/100-increment-decrement.t | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/100-increment-decrement.t b/t/100-increment-decrement.t index b04a379..ea27a64 100644 --- a/t/100-increment-decrement.t +++ b/t/100-increment-decrement.t @@ -86,6 +86,12 @@ is( ); is( + incdec::incdec('test -1 ', 1, 7, 1), + 'test 0 ', + 'increments the negative integer with point at position 7 backward' +); + +is( incdec::incdec('test 12', -1), 'test 11', 'decrements the first integer' |
