Split off dedicated tests for listpri.

Bonus: Fixed alignment of listpri help message.
This commit is contained in:
Ingo Karkat
2011-05-10 14:54:59 +02:00
parent 56bd927747
commit a830f18dd5
3 changed files with 33 additions and 3 deletions

View File

@@ -87,10 +87,11 @@ TODO: 3 of 3 tasks shown
2 (A) notice the sunflowers
TODO: 2 already prioritized (A).
>>> todo.sh -p listpri
>>> todo.sh -p list
2 (A) notice the sunflowers
1 (B) smell the uppercase Roses +flowers @outside
3 stop
--
TODO: 2 of 3 tasks shown
TODO: 3 of 3 tasks shown
EOF
test_done

29
tests/t1250-listpri.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
test_description='list priority functionality
'
. ./test-lib.sh
test_todo_session 'listpri usage' <<EOF
>>> todo.sh listpri ?
usage: todo.sh listpri PRIORITY
note: PRIORITY must a single letter from A to Z.
=== 1
EOF
cat > todo.txt <<EOF
(B) smell the uppercase Roses +flowers @outside
(C) notice the sunflowers
stop
EOF
test_todo_session 'basic listpri' <<EOF
>>> todo.sh listpri A
--
TODO: 0 of 3 tasks shown
>>> todo.sh -p listpri c
2 (C) notice the sunflowers
--
TODO: 1 of 3 tasks shown
EOF
test_done