taskwarrior/test/test_hooks/on-modify-misbehave4
Paul Beckingham f454eecafb Unit Tests
- Corrected expected output.
- Added 'complete' task to the on-modify-misbehave4 test hook script.
2015-02-14 17:46:24 -05:00

21 lines
588 B
Bash

#!/bin/sh
# The on-modify event is triggered separately for each task modified. This hook
# script can accept/reject the modification. Processing will continue.
# Input:
# - line of JSON for the original task
# - line of JSON for the modified task, the diff being the modification
read original_task
read modified_task
# Output:
# - JSON, modified or unmodified.
# - Optional feedback/error.
echo '{"description":"different","status":"pending","uuid":"bad"}'
echo 'FEEDBACK'
# Status:
# - 0: JSON accepted, non-JSON is feedback.
# - non-0: JSON ignored, non-JSON is error.
exit 0