#!/bin/bash # test_description='listproj functionality This test checks basic project listing functionality ' . ./test-lib.sh cat > todo.txt < output && ! test -s output ' cat > todo.txt <>> todo.sh listproj +1 +p2 +prj03 +prj04 +prj05+prj06 EOF cat > todo.txt <>> todo.sh listproj +prj01 +prj02 +prj03 EOF cat > todo.txt <>> todo.sh listproj +prj01 +prj02 EOF cat > todo.txt <>> todo.sh listproj +landscape +roses +shared +sunflowers EOF test_todo_session 'listproj with context' <>> todo.sh listproj @garden +landscape +shared +sunflowers EOF TEST_TODO_CUSTOM=todo-custom.cfg cat todo.cfg > "$TEST_TODO_CUSTOM" cat >> "$TEST_TODO_CUSTOM" <<'EOF' export DEFAULT='' export PRI_B='' export PRI_C='' export TODOTXT_FINAL_FILTER='grep -i roses' EOF test_todo_session 'listproj with context special cases' <>> todo.sh -+ -d "$TEST_TODO_CUSTOM" listproj @garden +landscape +shared +sunflowers EOF cat > todo.txt < done.txt <>> TODOTXT_SOURCEVAR=\$DONE_FILE todo.sh listproj +done01 +done02 EOF test_todo_session 'listproj from done tasks with filtering' <<'EOF' >>> TODOTXT_SOURCEVAR=\$DONE_FILE todo.sh listproj Special +done01 EOF test_todo_session 'listproj from combined open + done tasks' <<'EOF' >>> TODOTXT_SOURCEVAR='("$TODO_FILE" "$DONE_FILE")' todo.sh listproj +done01 +done02 +prj01 EOF test_done