File: t6030-completion-tasks.sh

package info (click to toggle)
todotxt-cli 2.11.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,312 kB
  • sloc: sh: 5,393; makefile: 67
file content (27 lines) | stat: -rwxr-xr-x 1,170 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
#

test_description='Bash task number completion functionality

This test checks todo_completion of a task number into the abbreviated task text.
'
. ./test-lib.sh

cat > todo.txt <<EOF
simple task
notice the sunflowers +sunflowers @outside @garden +shared +landscape
(B) smell the +roses flower @outside @outdoor +shared
(C) 2012-02-28 @outside mow the lawn
x 2012-02-21 +herbs @oriental buy spices
x 2012-02-28 2012-02-21 +slack @home watch tv
2012-02-28 +herbs buy cinnamon @grocer
EOF
test_todo_completion 'simple task' 'todo-txt list 1' '"1 # simple task"'
test_todo_completion 'remove projects and contents from task' 'todo-txt list 2' '"2 # notice the sunflowers"'
test_todo_completion 'keep priority' 'todo-txt list 3' '"3 # (B) smell the flower"'
test_todo_completion 'keep priority and remove timestamp' 'todo-txt list 4' '"4 # (C) mow the lawn"'
test_todo_completion 'keep done marker and remove done date' 'todo-txt list 5' '"5 # x buy spices"'
test_todo_completion 'keep done marker and remove timestamp and done date' 'todo-txt list 6' '"6 # x watch tv"'
test_todo_completion 'remove add date' 'todo-txt list 7' '"7 # buy cinnamon"'

test_done