From 8c7043390f80d93445f2817ae5419b06fc72983a Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 6 Nov 2019 00:05:22 -0500 Subject: scripts/library: remove human_to_size pkgdelta was the last user, and it is gone now. Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- test/scripts/human_to_size_test.sh | 55 -------------------------------------- 1 file changed, 55 deletions(-) delete mode 100755 test/scripts/human_to_size_test.sh (limited to 'test/scripts/human_to_size_test.sh') diff --git a/test/scripts/human_to_size_test.sh b/test/scripts/human_to_size_test.sh deleted file mode 100755 index fe9a94ba..00000000 --- a/test/scripts/human_to_size_test.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -source "$(dirname "$0")"/../tap.sh || exit 1 - -# source the library function -lib=${1:-${PMTEST_SCRIPTLIB_DIR}human_to_size.sh} -if [[ -z $lib || ! -f $lib ]]; then - tap_bail "human_to_size library (%s) could not be located" "${lib}" - exit 1 -fi -. "$lib" - -if ! type -t human_to_size &>/dev/null; then - tap_bail "human_to_size function not found" - exit 1 -fi - -tap_parse_hts() { - local input=$1 expected=$2 - tap_is_str "$(human_to_size "$input")" "$expected" "$input" -} - -tap_plan 15 - -# tap_parse_hts - -tap_parse_hts '1MiB' 1048576 - -tap_parse_hts '10XiB' '' - -tap_parse_hts '10 MiB' 10485760 - -tap_parse_hts '10 XiB' '' - -tap_parse_hts '.1 TiB' 109951162778 - -tap_parse_hts ' -3 KiB ' -3072 - -tap_parse_hts 'foo3KiB' '' - -tap_parse_hts '3KiBfoo' '' - -tap_parse_hts '3kib' '' - -tap_parse_hts '+1KiB' 1024 - -tap_parse_hts '+1.0 KiB' 1024 - -tap_parse_hts '1MB' 1000000 - -tap_parse_hts '1M' 1048576 - -tap_parse_hts ' 1 G ' 1073741824 - -tap_parse_hts '1Q' '' -- cgit v1.2.3-24-g4f1b