diff options
| author | Teddy Wing | 2021-08-08 19:07:47 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2021-08-08 19:08:18 +0200 | 
| commit | 5faf72596a1f5d9e209e10ea35dae5570735ddb4 (patch) | |
| tree | 42f778620a65362415aad0f0013a4dd72b60e6ca /t | |
| parent | 965aafb4d9ff0eba748704b32ab140e9a019dde1 (diff) | |
| download | readline-incdec-5faf72596a1f5d9e209e10ea35dae5570735ddb4.tar.bz2 | |
incdec.pm: Add some tests and ideas for incrementing substrings
Substrings and direction.
Diffstat (limited to 't')
| -rw-r--r-- | t/100-increment-decrement.t | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/t/100-increment-decrement.t b/t/100-increment-decrement.t index d3b1e13..9420f3a 100644 --- a/t/100-increment-decrement.t +++ b/t/100-increment-decrement.t @@ -13,4 +13,22 @@ is(  	'increments an integer'  ); +is( +	incdec::incdec('test 12 0'), +	'test 13 0', +	'increments the first integer' +); + +is( +	incdec::incdec('test 12 0', 6), +	'test 13 0', +	'increments the first integer with point at position 6' +); + +is( +	incdec::incdec('test 12 0', 7), +	'test 12 1', +	'increments the second integer with point at position 7' +); +  done_testing; | 
