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/Makefile.am | 3 +-- test/scripts/human_to_size_test.sh | 55 -------------------------------------- test/scripts/meson.build | 1 - 3 files changed, 1 insertion(+), 58 deletions(-) delete mode 100755 test/scripts/human_to_size_test.sh (limited to 'test') diff --git a/test/scripts/Makefile.am b/test/scripts/Makefile.am index 07fe63da..0100bffb 100644 --- a/test/scripts/Makefile.am +++ b/test/scripts/Makefile.am @@ -1,8 +1,7 @@ check_SCRIPTS = \ parseopts_test.sh \ pacman-db-upgrade-v9.py \ - makepkg-template_test.sh \ - human_to_size_test.sh + makepkg-template_test.sh noinst_SCRIPTS = $(check_SCRIPTS) 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' '' diff --git a/test/scripts/meson.build b/test/scripts/meson.build index 0dd05fd9..6d13ad1e 100644 --- a/test/scripts/meson.build +++ b/test/scripts/meson.build @@ -1,7 +1,6 @@ tests = [ 'parseopts_test.sh', 'makepkg-template_test.sh', - 'human_to_size_test.sh', ] foreach tst : tests -- cgit v1.2.3-54-g00ecf