diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-19 13:58:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-19 13:58:24 +0100 |
commit | 12652841746da7ae2f03b8b0c571a9bd5033e15c (patch) | |
tree | 17ba3a2b3f142284453d0e9109be1765200f643b /eclass/tests/dist-kernel-utils.sh | |
parent | 27f7ac2204449d9fc2137f442522b4fb10327d90 (diff) |
gentoo auto-resync : 19:10:2022 - 13:58:24
Diffstat (limited to 'eclass/tests/dist-kernel-utils.sh')
-rwxr-xr-x | eclass/tests/dist-kernel-utils.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/eclass/tests/dist-kernel-utils.sh b/eclass/tests/dist-kernel-utils.sh new file mode 100755 index 000000000000..7f04f55ce302 --- /dev/null +++ b/eclass/tests/dist-kernel-utils.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +source tests-common.sh || exit + +inherit dist-kernel-utils +# TODO: hack because tests-common don't implement ver_cut +EAPI=6 inherit eapi7-ver + +test_PV_to_KV() { + local kv=${1} + local exp_PV=${2} + + tbegin "dist-kernel_PV_to_KV ${kv} -> ${exp_PV}" + local val=$(dist-kernel_PV_to_KV "${kv}") + [[ ${val} == ${exp_PV} ]] + tend $? +} + +test_PV_to_KV 6.0_rc1 6.0.0-rc1 +test_PV_to_KV 6.0 6.0.0 +test_PV_to_KV 6.0.1_rc1 6.0.1-rc1 +test_PV_to_KV 6.0.1 6.0.1 + +texit |