mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
test: Add tests for TW #2550
This commit is contained in:
parent
89a6f2b629
commit
7fb457d892
1 changed files with 33 additions and 0 deletions
33
test/tw-2550.t
Executable file
33
test/tw-2550.t
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
. bash_tap_tw.sh
|
||||||
|
|
||||||
|
# Setup the context
|
||||||
|
task config context.work.read '+work'
|
||||||
|
task config context.work.write '+work'
|
||||||
|
|
||||||
|
# Create a task outside of the context
|
||||||
|
task add outside
|
||||||
|
|
||||||
|
# Activate the context
|
||||||
|
task context work
|
||||||
|
|
||||||
|
# Add multiple tasks within the context, some of which contain numbers or uuids
|
||||||
|
task add inside
|
||||||
|
task add inside 2
|
||||||
|
task add inside 3
|
||||||
|
task add inside aabbccdd
|
||||||
|
task add inside 4-5
|
||||||
|
|
||||||
|
# Assertion: Task defined outside of the context should not show up
|
||||||
|
[[ -z `task all | grep outside` ]]
|
||||||
|
|
||||||
|
# Five tasks were defined within the context
|
||||||
|
task count
|
||||||
|
[[ `task count` == "5" ]]
|
||||||
|
|
||||||
|
# Unset the context
|
||||||
|
task context none
|
||||||
|
|
||||||
|
# Exactly five tasks have the tag work
|
||||||
|
task +work count
|
||||||
|
[[ `task +work count` == "5" ]]
|
Loading…
Add table
Add a link
Reference in a new issue