#!/bin/bash # test_description='highlighting projects and contexts This test checks the highlighting (with colors) of projects and contexts. ' . ./test-lib.sh # Prioritized tasks with projects and contexts cat > todo.txt < "$TEST_TODO_LABEL_COLORS" echo "export COLOR_CONTEXT='\\\\033[1m'" >>"$TEST_TODO_LABEL_COLORS" echo "export COLOR_PROJECT='\\\\033[2m'" >>"$TEST_TODO_LABEL_COLORS" test_todo_session 'highlighting for contexts and projects' <<'EOF' >>> todo.sh -d "$TEST_TODO_LABEL_COLORS" ls 1 (A) prioritized @con01 context 2 (B) prioritized +prj02 project 3 (C) prioritized context at EOL @con03 4 (D) prioritized project at EOL +prj04 5 +prj05 non-prioritized project at BOL 6 @con06 non-prioritized context at BOL 7 multiple @con_ @texts and +pro_ +jects 8 non-contexts: seti@home @ @* @(foo) 9 non-projects: lost+found + +! +(bar) -- TODO: 9 of 9 tasks shown EOF test_todo_session 'suppressing highlighting for contexts and projects' <<'EOF' >>> todo.sh -p -d "$TEST_TODO_LABEL_COLORS" ls 1 (A) prioritized @con01 context 2 (B) prioritized +prj02 project 3 (C) prioritized context at EOL @con03 4 (D) prioritized project at EOL +prj04 5 +prj05 non-prioritized project at BOL 6 @con06 non-prioritized context at BOL 7 multiple @con_ @texts and +pro_ +jects 8 non-contexts: seti@home @ @* @(foo) 9 non-projects: lost+found + +! +(bar) -- TODO: 9 of 9 tasks shown EOF test_todo_session 'suppressing display of contexts' <<'EOF' >>> todo.sh -@ -d "$TEST_TODO_LABEL_COLORS" ls 1 (A) prioritized context 2 (B) prioritized +prj02 project 3 (C) prioritized context at EOL 4 (D) prioritized project at EOL +prj04 5 +prj05 non-prioritized project at BOL 6 non-prioritized context at BOL 7 multiple and +pro_ +jects 8 non-contexts: seti@home @ 9 non-projects: lost+found + +! +(bar) -- TODO: 9 of 9 tasks shown EOF test_todo_session 'suppressing display of projects' <<'EOF' >>> todo.sh -+ -d "$TEST_TODO_LABEL_COLORS" ls 1 (A) prioritized @con01 context 2 (B) prioritized project 3 (C) prioritized context at EOL @con03 4 (D) prioritized project at EOL 5 non-prioritized project at BOL 6 @con06 non-prioritized context at BOL 7 multiple @con_ @texts and 8 non-contexts: seti@home @ @* @(foo) 9 non-projects: lost+found + -- TODO: 9 of 9 tasks shown EOF test_done