Refactoring: Extract make_action into actions-test-lib.sh.
This reduces the duplication in the individual test files.
This commit is contained in:
@@ -4,19 +4,9 @@ test_description='listaddons functionality
|
||||
|
||||
This test checks listing of custom actions.
|
||||
'
|
||||
. ./actions-test-lib.sh
|
||||
. ./test-lib.sh
|
||||
|
||||
unset TODO_ACTIONS_DIR
|
||||
mkdir .todo.actions.d
|
||||
make_action()
|
||||
{
|
||||
cat > ".todo.actions.d/$1" <<- EOF
|
||||
#!/bin/bash
|
||||
echo "custom action $1"
|
||||
EOF
|
||||
chmod +x ".todo.actions.d/$1"
|
||||
}
|
||||
|
||||
test_todo_session 'no custom actions' <<EOF
|
||||
>>> todo.sh listaddons
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user