|
1 |
| -plan(26*3*2 + 3); |
| 1 | +plan(31*3*2 + 3); |
2 | 2 |
|
3 | 3 | sub test_radix($radix,$str,$pos,$flags,$value,$mult,$offset,$desc) {
|
4 | 4 | my $result := nqp::radix($radix,$str,$pos,$flags);
|
@@ -69,3 +69,10 @@ if nqp::getcomp('nqp').backend.name eq 'jvm' {
|
69 | 69 | test_radix_both(16,$full_width_capital,0,2, 51966,65536,4, "fullwidth capital letters");
|
70 | 70 | test_radix_both(16,$full_width_small,0,2, 51966,65536,4, "fullwidth small letters");
|
71 | 71 | }
|
| 72 | + |
| 73 | +test_radix_both(8,"8238321",0,2, 0,1,-1, "all digits outside of radix"); |
| 74 | +test_radix_both(8,"1838321",0,2, 1,8,1, "all but one digits outside of radix"); |
| 75 | + |
| 76 | +test_radix_both(10,"123foobar",0,2, 123,1000,3, "no digits consumed with digit outside radix"); |
| 77 | +test_radix_both(8,"1238321",0,2, 83,512,3, "no digits consumed with digit outside radix"); |
| 78 | +test_radix_both(8,"-1238321",1,2, 83,512,4, "no digits consumed with digit outside radix"); |
0 commit comments