From 6221770c9de4d28137206bdcd1a67eea12e1e499 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 3975986c0..e7e2fc770 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