From 51af22745ecefdd49f0f92f41b391ea4229d2967 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 24 Mar 2024 15:04:06 +0100 Subject: [PATCH] tests/functional: Add count() --- tests/functional/common/vars-and-functions.sh.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/common/vars-and-functions.sh.in b/tests/functional/common/vars-and-functions.sh.in index 3975986c003b..e7e2fc770026 100644 --- a/tests/functional/common/vars-and-functions.sh.in +++ b/tests/functional/common/vars-and-functions.sh.in @@ -283,6 +283,11 @@ grepQuietInverse() { ! grep "$@" > /dev/null } +# Return the number of arguments +count() { + echo $# +} + trap onError ERR fi # COMMON_VARS_AND_FUNCTIONS_SH_SOURCED