Split off dedicated tests for listpri.
Bonus: Fixed alignment of listpri help message.
This commit is contained in:
@@ -87,10 +87,11 @@ TODO: 3 of 3 tasks shown
|
|||||||
2 (A) notice the sunflowers
|
2 (A) notice the sunflowers
|
||||||
TODO: 2 already prioritized (A).
|
TODO: 2 already prioritized (A).
|
||||||
|
|
||||||
>>> todo.sh -p listpri
|
>>> todo.sh -p list
|
||||||
2 (A) notice the sunflowers
|
2 (A) notice the sunflowers
|
||||||
1 (B) smell the uppercase Roses +flowers @outside
|
1 (B) smell the uppercase Roses +flowers @outside
|
||||||
|
3 stop
|
||||||
--
|
--
|
||||||
TODO: 2 of 3 tasks shown
|
TODO: 3 of 3 tasks shown
|
||||||
EOF
|
EOF
|
||||||
test_done
|
test_done
|
||||||
|
|||||||
29
tests/t1250-listpri.sh
Executable file
29
tests/t1250-listpri.sh
Executable 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
|
||||||
Reference in New Issue
Block a user