mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
tests: Add test for TW #1804
This commit is contained in:
parent
8f7e41b392
commit
88eca5f535
1 changed files with 18 additions and 0 deletions
18
test/tw-1804.t
Executable file
18
test/tw-1804.t
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
. bash_tap_tw.sh
|
||||||
|
|
||||||
|
# Import a task with annotation without an description
|
||||||
|
# Should fail
|
||||||
|
OUTPUT=`echo '{"description":"Buy the milk","annotations":[{"entry": 1234567890}]}' | task import - 2>&1` || :
|
||||||
|
[[ $OUTPUT =~ "missing a description" ]]
|
||||||
|
|
||||||
|
# Check that the task was NOT added
|
||||||
|
[[ `task count` == 0 ]]
|
||||||
|
|
||||||
|
# Import a task with annotation without an entry
|
||||||
|
echo '{"description":"Buy the milk","annotations":[{"description":"and Cheese"}]}' | task import -
|
||||||
|
|
||||||
|
# Check that the task was added
|
||||||
|
[[ `task count` == 1 ]]
|
||||||
|
[[ `task milk count` == 1 ]]
|
||||||
|
[[ `task _get 1.annotations.count` == 1 ]]
|
Loading…
Add table
Add a link
Reference in a new issue