diff --git a/tests/t1000-addlist.sh b/tests/t1000-addlist.sh index 74cb037..83680c5 100755 --- a/tests/t1000-addlist.sh +++ b/tests/t1000-addlist.sh @@ -77,4 +77,37 @@ TODO: 5 added. TODO: 5 of 5 tasks shown EOF +# +# Advanced add +# + +cat /dev/null > todo.txt +test_todo_session 'add with spaces' <>> todo.sh add "notice the three spaces" +1 notice the three spaces +TODO: 1 added. + +>>> todo.sh add notice how the spaces get lost +2 notice how the spaces get lost +TODO: 2 added. + +>>> todo.sh list +2 notice how the spaces get lost +1 notice the three spaces +-- +TODO: 2 of 2 tasks shown +EOF + +cat /dev/null > todo.txt +test_todo_session 'add with CR' <>> todo.sh add "smell the Carriage Return" +1 smell the Carriage Return +TODO: 1 added. + +>>> todo.sh list +1 smell the Carriage Return +-- +TODO: 1 of 1 tasks shown +EOF + test_done diff --git a/tests/t1100-replace.sh b/tests/t1100-replace.sh index 370446f..068ab5c 100755 --- a/tests/t1100-replace.sh +++ b/tests/t1100-replace.sh @@ -89,6 +89,14 @@ TODO: Replaced task with: 1 thrash the hay & thrash the wheat EOF +echo 'jump on hay' > todo.txt +test_todo_session 'replace with spaces' <>> todo.sh replace 1 "notice the three spaces" +1 jump on hay +TODO: Replaced task with: +1 notice the three spaces +EOF + cat > todo.txt < todo.txt +test_todo_session 'prepend with spaces' <>> todo.sh prepend 1 "notice the three spaces and" +1 notice the three spaces and jump on hay +EOF + cat > todo.txt < todo.txt +test_todo_session 'append with spaces' <>> todo.sh append 1 "and notice the three spaces" +1 jump on hay and notice the three spaces +EOF + cat > todo.txt <