From f76b6d5210ba831b97b72e457aa8f2bb93219a73 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Tue, 28 Feb 2012 10:02:42 +0100 Subject: [PATCH] Add test for todo file completion. --- tests/t6040-completion-files.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 tests/t6040-completion-files.sh diff --git a/tests/t6040-completion-files.sh b/tests/t6040-completion-files.sh new file mode 100755 index 0000000..ad43054 --- /dev/null +++ b/tests/t6040-completion-files.sh @@ -0,0 +1,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.sh addto ' "$FILES" +test_todo_completion 'files beginning with d after addto' 'todo.sh addto d' 'done.txt dummy.txt' +test_todo_completion 'all files after listfile' 'todo.sh listfile ' "$FILES" +test_todo_completion 'all files after lf' 'todo.sh -v lf ' "$FILES" +test_todo_completion 'nothing after move' 'todo.sh move ' '' +test_todo_completion 'all files after move ITEM#' 'todo.sh move 1 ' "$FILES" +test_todo_completion 'all files after mv ITEM#' 'todo.sh mv 1 ' "$FILES" +test_todo_completion 'all files after move ITEM# DEST' 'todo.sh move 1 todo.sh ' "$FILES" + +test_done