diff options
author | Francesco Cosoleto | 2011-05-26 15:17:25 +0200 |
---|---|---|
committer | Karel Zak | 2011-05-26 15:32:33 +0200 |
commit | 5d2a98490e87872214e6acdeac1031c0eb8cfc92 (patch) | |
tree | d2eaea544a6d8b662612e71395196c92bb6b5833 /tests/expected/misc | |
parent | build-sys: use AUTOMAKE_OPTIONS = gnu (diff) | |
download | kernel-qcow2-util-linux-5d2a98490e87872214e6acdeac1031c0eb8cfc92.tar.gz kernel-qcow2-util-linux-5d2a98490e87872214e6acdeac1031c0eb8cfc92.tar.xz kernel-qcow2-util-linux-5d2a98490e87872214e6acdeac1031c0eb8cfc92.zip |
This adds a second parameter to size_to_human_string() to return a
string with a different format based on the following flags:
SIZE_SUFFIX_1LETTER = "1K"
SIZE_SUFFIX_3LETTER = "1KiB",
SIZE_SUFFIX_SPACE = "1 KiB" or "1 K"
[kzak@redhat.com: - rename flags to SIZE_SUFFIX_* format,
- fix suffix[] buffer size
- add 3 letter version to the test]
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/expected/misc')
-rw-r--r-- | tests/expected/misc/strtosize | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/expected/misc/strtosize b/tests/expected/misc/strtosize index 0dd5e3e76..94fd69a1f 100644 --- a/tests/expected/misc/strtosize +++ b/tests/expected/misc/strtosize @@ -1,30 +1,30 @@ test_strutils: invalid size '-1' value - 0 : 0 : 0B - 1 : 1 : 1B - 123 : 123 : 123B - 18446744073709551615 : 18446744073709551615 : 16E - 1K : 1024 : 1K - 1KiB : 1024 : 1K - 1M : 1048576 : 1M - 1MiB : 1048576 : 1M - 1G : 1073741824 : 1G - 1GiB : 1073741824 : 1G - 1T : 1099511627776 : 1T - 1TiB : 1099511627776 : 1T - 1P : 1125899906842624 : 1P - 1PiB : 1125899906842624 : 1P - 1E : 1152921504606846976 : 1E - 1EiB : 1152921504606846976 : 1E - 1KB : 1000 : 1000B - 1MB : 1000000 : 976.6K - 1GB : 1000000000 : 953.7M - 1TB : 1000000000000 : 931.3G - 1PB : 1000000000000000 : 909.5T - 1EB : 1000000000000000000 : 888.2P + 0 : 0 : 0B : 0 B + 1 : 1 : 1B : 1 B + 123 : 123 : 123B : 123 B + 18446744073709551615 : 18446744073709551615 : 16E : 16 EiB + 1K : 1024 : 1K : 1 KiB + 1KiB : 1024 : 1K : 1 KiB + 1M : 1048576 : 1M : 1 MiB + 1MiB : 1048576 : 1M : 1 MiB + 1G : 1073741824 : 1G : 1 GiB + 1GiB : 1073741824 : 1G : 1 GiB + 1T : 1099511627776 : 1T : 1 TiB + 1TiB : 1099511627776 : 1T : 1 TiB + 1P : 1125899906842624 : 1P : 1 PiB + 1PiB : 1125899906842624 : 1P : 1 PiB + 1E : 1152921504606846976 : 1E : 1 EiB + 1EiB : 1152921504606846976 : 1E : 1 EiB + 1KB : 1000 : 1000B : 1000 B + 1MB : 1000000 : 976.6K : 976.6 KiB + 1GB : 1000000000 : 953.7M : 953.7 MiB + 1TB : 1000000000000 : 931.3G : 931.3 GiB + 1PB : 1000000000000000 : 909.5T : 909.5 TiB + 1EB : 1000000000000000000 : 888.2P : 888.2 PiB test_strutils: invalid size '' value test_strutils: invalid size ' ' value - 1 : 1 : 1B + 1 : 1 : 1B : 1 B test_strutils: invalid size '1 ' value - 0x0a : 10 : 10B - 0xff00 : 65280 : 63.8K - 0x80000000 : 2147483648 : 2G + 0x0a : 10 : 10B : 10 B + 0xff00 : 65280 : 63.8K : 63.8 KiB + 0x80000000 : 2147483648 : 2G : 2 GiB |