File: t6020-completion-projects.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 918 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 project completion functionality

This test checks todo_completion of projects
'
. ./test-lib.sh

cat > todo.txt <<EOF
(B) smell the +roses @outside @outdoor +shared
notice the sunflowers +sunflowers @outside @garden +shared +landscape
stop
EOF
cat > done.txt <<EOF
x 2012-02-21 +herbs @oriental buy spices
x 2012-02-21 +slack @home watch tv
EOF
test_todo_completion 'all projects' 'todo-txt list +' '+landscape +roses +shared +sunflowers'
test_todo_completion 'projects beginning with s' 'todo-txt list +s' '+shared +sunflowers'
test_todo_completion 'projects beginning with ro' 'todo-txt list +ro' '+roses'
test_todo_completion 'projects beginning with x' 'todo-txt list +x' ''

test_todo_completion 'projects from done tasks beginning with h' 'todo-txt list +h' '+herbs'
test_todo_completion 'projects from done tasks beginning with sl' 'todo-txt list +sl' '+slack'

test_done