Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2019-11-06 00:05:22 -0500
committerAllan McRae <allan@archlinux.org>2019-11-06 15:52:21 +1000
commit8c7043390f80d93445f2817ae5419b06fc72983a (patch)
treefab602cc728790a41c63d91332419f2cc9e6b218 /test
parent2dd7725f2a0cccd0a248531551c9fbea4ef35f1f (diff)
scripts/library: remove human_to_size
pkgdelta was the last user, and it is gone now. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/scripts/Makefile.am3
-rwxr-xr-xtest/scripts/human_to_size_test.sh55
-rw-r--r--test/scripts/meson.build1
3 files changed, 1 insertions, 58 deletions
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 <input> <expected output>
-
-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