diff options
| author | Teddy Wing | 2022-07-12 00:22:41 +0200 |
|---|---|---|
| committer | Teddy Wing | 2022-07-12 00:22:41 +0200 |
| commit | a4bd55db89de4851d4dfa31d9c3ec44e7e000980 (patch) | |
| tree | 9f042c44f2eb858e3578c1483cb120bcb90abde4 /t/100-increment-decrement.t | |
| parent | e3496478575027810844994990fbc789f4387939 (diff) | |
| download | readline-incdec-a4bd55db89de4851d4dfa31d9c3ec44e7e000980.tar.bz2 | |
t/100-increment-decrement.t: Add test for character after number removedfix-character-after-0-removed-after-incrementing
Noticed while using the increment function that the character following
a "0" is removed after incrementing it, at least in a certain case. Add
a failing test for this case so we can fix it.
Diffstat (limited to 't/100-increment-decrement.t')
| -rw-r--r-- | t/100-increment-decrement.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/100-increment-decrement.t b/t/100-increment-decrement.t index cba66e8..431779d 100644 --- a/t/100-increment-decrement.t +++ b/t/100-increment-decrement.t @@ -60,6 +60,14 @@ is_deeply( 'increments a negative integer with a leading zero' ); +@got = incdec::incdec('openssl x509 -inform DER -in codesign0 -text', 1); +@want = ('openssl x509 -inform DER -in codesign1 -text', 37); +is_deeply( + \@got, + \@want, + 'increments a zero without removing the following character' +); + @got = incdec::incdec('test 12 0', 1, 6); @want = ('test 13 0', 5); is_deeply( |
