File: t6040-completion-files.sh

package info (click to toggle)
todotxt-cli 2.11.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 1,312 kB
  • sloc: sh: 5,393; makefile: 67
file content (21 lines) | stat: -rwxr-xr-x 846 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
#!/bin/bash
#

test_description='Bash todo file completion functionality

This test checks todo_completion of files in TODO_DIR.
'
. ./test-lib.sh

> dummy.txt
readonly FILES='done.txt dummy.txt report.txt todo.txt'
test_todo_completion 'all files after addto' 'todo-txt addto ' "$FILES"
test_todo_completion 'files beginning with d after addto' 'todo-txt addto d' 'done.txt dummy.txt'
test_todo_completion 'all files after listfile' 'todo-txt listfile ' "$FILES"
test_todo_completion 'all files after lf' 'todo-txt -v lf ' "$FILES"
test_todo_completion 'nothing after move' 'todo-txt move ' ''
test_todo_completion 'all files after move ITEM#' 'todo-txt move 1 ' "$FILES"
test_todo_completion 'all files after mv ITEM#' 'todo-txt mv 1 ' "$FILES"
test_todo_completion 'all files after move ITEM# DEST' 'todo-txt move 1 todo ' "$FILES"

test_done