diff options
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/numfmt.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/misc/numfmt.pl b/tests/misc/numfmt.pl index 8af55a471..e8640c0f7 100755 --- a/tests/misc/numfmt.pl +++ b/tests/misc/numfmt.pl @@ -92,8 +92,14 @@ my @Tests = ['unit-6', '--from-unit=54W --from=iec --to=iec 4M', {ERR => "$prog: invalid unit size: '54W'\n"}, {EXIT => '1'}], - # Not fully documented.. "--{from,to}-unit" can accept IEC suffixes - ['unit-7', '--from-unit=2K --to=iec 30', {OUT=>"60K"}], + ['unit-7', '--from-unit=K 30', {OUT=>"30000"}], + ['unit-7.1', '--from-unit=Ki 30', {OUT=>"30720"}], + ['unit-7.2', '--from-unit=i 0', + {ERR => "$prog: invalid unit size: 'i'\n"}, + {EXIT => '1'}], + ['unit-7.3', '--from-unit=1i 0', + {ERR => "$prog: invalid unit size: '1i'\n"}, + {EXIT => '1'}], ['unit-8', '--from-unit=1234567890123456789012345 --to=iec 30', {ERR => "$prog: invalid unit size: '1234567890123456789012345'\n"}, {EXIT => '1'}], |