- test empty string, white spaces - test hexadecimal Signed-off-by: Yann Droneaud <yann@xxxxxxxxxxx> --- tests/expected/misc/strtosize | 7 +++++++ tests/ts/misc/strtosize | 9 +++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/tests/expected/misc/strtosize b/tests/expected/misc/strtosize index b7cb246..04a2d59 100644 --- a/tests/expected/misc/strtosize +++ b/tests/expected/misc/strtosize @@ -21,3 +21,10 @@ test_strtosize: invalid size '-1' value 1TB : 1000000000000 1PB : 1000000000000000 1EB : 1000000000000000000 +test_strtosize: invalid size '' value +test_strtosize: invalid size ' ' value + 1 : 1 +test_strtosize: invalid size '1 ' value + 0x0a : 10 + 0xff00 : 65280 + 0x80000000 : 2147483648 diff --git a/tests/ts/misc/strtosize b/tests/ts/misc/strtosize index 4668823..41b4549 100755 --- a/tests/ts/misc/strtosize +++ b/tests/ts/misc/strtosize @@ -47,5 +47,14 @@ $TS_HELPER_STRTOSIZE 1TB >> $TS_OUTPUT 2>&1 $TS_HELPER_STRTOSIZE 1PB >> $TS_OUTPUT 2>&1 $TS_HELPER_STRTOSIZE 1EB >> $TS_OUTPUT 2>&1 +$TS_HELPER_STRTOSIZE "" >> $TS_OUTPUT 2>&1 +$TS_HELPER_STRTOSIZE " " >> $TS_OUTPUT 2>&1 +$TS_HELPER_STRTOSIZE " 1" >> $TS_OUTPUT 2>&1 +$TS_HELPER_STRTOSIZE "1 " >> $TS_OUTPUT 2>&1 + +$TS_HELPER_STRTOSIZE 0x0a >> $TS_OUTPUT 2>&1 +$TS_HELPER_STRTOSIZE 0xff00 >> $TS_OUTPUT 2>&1 +$TS_HELPER_STRTOSIZE 0x80000000 >> $TS_OUTPUT 2>&1 + ts_finalize -- 1.6.4.4 -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html