diff --git a/tests/t1200-pri.sh b/tests/t1200-pri.sh index 48a3067..3d4ca70 100755 --- a/tests/t1200-pri.sh +++ b/tests/t1200-pri.sh @@ -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 diff --git a/tests/t1250-listpri.sh b/tests/t1250-listpri.sh new file mode 100755 index 0000000..ea6b63d --- /dev/null +++ b/tests/t1250-listpri.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +test_description='list priority functionality +' +. ./test-lib.sh + +test_todo_session 'listpri usage' <>> todo.sh listpri ? +usage: todo.sh listpri PRIORITY +note: PRIORITY must a single letter from A to Z. +=== 1 +EOF + +cat > todo.txt <>> 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 diff --git a/todo.sh b/todo.sh index 5592c73..6a1caef 100755 --- a/todo.sh +++ b/todo.sh @@ -1016,7 +1016,7 @@ case $action in ## A priority was specified pri=$( printf "%s\n" "$1" | tr 'a-z' 'A-Z' | grep '^[A-Z]$' ) || { die "usage: $TODO_SH listpri PRIORITY - note: PRIORITY must a single letter from A to Z." +note: PRIORITY must a single letter from A to Z." } else ## No priority specified; show all priority tasks