From 779200685366e173b29f62f6a3837b704363f85b Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Thu, 16 Sep 2021 19:44:48 +0200 Subject: [PATCH] Tests: Refactoring: Extract make_dummy_action() The action script creation in both test helper functions is pretty similar; extract a function for that so that the invocation is a single command. --- tests/actions-test-lib.sh | 40 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/tests/actions-test-lib.sh b/tests/actions-test-lib.sh index 51d4eef..2530fb8 100644 --- a/tests/actions-test-lib.sh +++ b/tests/actions-test-lib.sh @@ -1,20 +1,26 @@ #!/bin/bash +make_dummy_action() +{ + local actionName; actionName="$(basename "${1:?}")" + cat > "$1" < ".todo.actions.d/$1" < ".todo.actions.d/$1/$1" <