summaryrefslogtreecommitdiffstats
path: root/test/scripts/human_to_size_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/scripts/human_to_size_test.sh')
-rwxr-xr-xtest/scripts/human_to_size_test.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/scripts/human_to_size_test.sh b/test/scripts/human_to_size_test.sh
index e412e836..6334495f 100755
--- a/test/scripts/human_to_size_test.sh
+++ b/test/scripts/human_to_size_test.sh
@@ -15,43 +15,43 @@ if ! type -t human_to_size &>/dev/null; then
exit 1
fi
-parse_hts() {
+tap_parse_hts() {
local input=$1 expected=$2
tap_is_str "$(human_to_size "$input")" "$expected" "$input"
}
tap_plan 15
-# parse_hts <input> <expected output>
+# tap_parse_hts <input> <expected output>
-parse_hts '1MiB' 1048576
+tap_parse_hts '1MiB' 1048576
-parse_hts '10XiB' ''
+tap_parse_hts '10XiB' ''
-parse_hts '10 MiB' 10485760
+tap_parse_hts '10 MiB' 10485760
-parse_hts '10 XiB' ''
+tap_parse_hts '10 XiB' ''
-parse_hts '.1 TiB' 109951162778
+tap_parse_hts '.1 TiB' 109951162778
-parse_hts ' -3 KiB ' -3072
+tap_parse_hts ' -3 KiB ' -3072
-parse_hts 'foo3KiB' ''
+tap_parse_hts 'foo3KiB' ''
-parse_hts '3KiBfoo' ''
+tap_parse_hts '3KiBfoo' ''
-parse_hts '3kib' ''
+tap_parse_hts '3kib' ''
-parse_hts '+1KiB' 1024
+tap_parse_hts '+1KiB' 1024
-parse_hts '+1.0 KiB' 1024
+tap_parse_hts '+1.0 KiB' 1024
-parse_hts '1MB' 1000000
+tap_parse_hts '1MB' 1000000
-parse_hts '1M' 1048576
+tap_parse_hts '1M' 1048576
-parse_hts ' 1 G ' 1073741824
+tap_parse_hts ' 1 G ' 1073741824
-parse_hts '1Q' ''
+tap_parse_hts '1Q' ''
# vim: set noet: