#!/bin/sh test_description='list priority functionality ' . ./test-lib.sh 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_todo_session 'listpri highlighting' <>> todo.sh listpri 1 (B) smell the uppercase Roses +flowers @outside 2 (C) notice the sunflowers -- TODO: 2 of 3 tasks shown EOF cat > todo.txt <>> todo.sh -p listpri 1 (B) smell the uppercase Roses +flowers @outside 2 (C) notice the sunflowers -- TODO: 2 of 5 tasks shown >>> todo.sh -p listpri b 1 (B) smell the uppercase Roses +flowers @outside -- TODO: 1 of 5 tasks shown >>> todo.sh -p listpri c 2 (C) notice the sunflowers -- TODO: 1 of 5 tasks shown >>> todo.sh -p listpri m -- TODO: 0 of 5 tasks shown >>> todo.sh -p listpri n -- TODO: 0 of 5 tasks shown EOF cat > todo.txt <>> todo.sh -p listpri a-c 1 (B) smell the uppercase Roses +flowers @outside 3 (C) notice the sunflowers -- TODO: 2 of 5 tasks shown >>> todo.sh -p listpri c-Z 3 (C) notice the sunflowers 2 (X) clean the house from A-Z 4 (X) listen to music -- TODO: 3 of 5 tasks shown >>> todo.sh -p listpri A- 2 (X) clean the house from A-Z -- TODO: 1 of 5 tasks shown >>> todo.sh -p listpri A-C A-Z -- TODO: 0 of 5 tasks shown >>> todo.sh -p listpri X A-Z 2 (X) clean the house from A-Z -- TODO: 1 of 5 tasks shown EOF cat > todo.txt <>> todo.sh -p listpri "should be" 3 (A) aaa zzz this line should be first. 5 (B) bbb yyy this line should be second. 1 (B) ccc xxx this line should be third. -- TODO: 3 of 6 tasks shown >>> todo.sh -p listpri a "should be" 3 (A) aaa zzz this line should be first. -- TODO: 1 of 6 tasks shown >>> todo.sh -p listpri b second 5 (B) bbb yyy this line should be second. -- TODO: 1 of 6 tasks shown >>> todo.sh -p listpri x "should be" -- TODO: 0 of 6 tasks shown EOF test_done