diff --git a/tests/t1100-replace.sh b/tests/t1100-replace.sh index aa3f9ad..370446f 100755 --- a/tests/t1100-replace.sh +++ b/tests/t1100-replace.sh @@ -45,6 +45,12 @@ grow some corn thrash some hay chase the chickens EOF +test_todo_session 'replace error' << EOF +>>> todo.sh replace 10 "hej!" +=== 1 +TODO: No task 10. +EOF + test_todo_session 'replace in multi-item file' <>> todo.sh replace 1 smell the cheese 1 smell the cows @@ -89,10 +95,24 @@ grow some corn thrash some hay chase the chickens EOF -test_todo_session 'replace error' << EOF ->>> todo.sh replace 10 "hej!" -=== 1 -TODO: No task 10. +test_todo_session 'replace with symbols' <>> todo.sh replace 1 "~@#$%^&*()-_=+[{]}|;:',<.>/?" +1 smell the cows +TODO: Replaced task with: +1 ~@#$%^&*()-_=+[{]}|;:',<.>/? + +>>> todo.sh replace 2 '\`!\\"' +2 grow some corn +TODO: Replaced task with: +2 \`!\\" + +>>> todo.sh list +4 chase the chickens +3 thrash some hay +2 \`!\\" +1 ~@#$%^&*()-_=+[{]}|;:',<.>/? +-- +TODO: 4 of 4 tasks shown EOF cat /dev/null > todo.txt diff --git a/tests/t1400-prepend.sh b/tests/t1400-prepend.sh index e0cc049..5ddd925 100755 --- a/tests/t1400-prepend.sh +++ b/tests/t1400-prepend.sh @@ -57,6 +57,28 @@ test_todo_session 'prepend with &' < todo.txt <>> todo.sh prepend 1 "~@#$%^&*()-_=+[{]}|;:',<.>/?" +1 ~@#$%^&*()-_=+[{]}|;:',<.>/? smell the cows + +>>> todo.sh prepend 2 '\`!\\"' +2 \`!\\" grow some corn + +>>> todo.sh list +4 chase the chickens +3 thrash some hay +2 \`!\\" grow some corn +1 ~@#$%^&*()-_=+[{]}|;:',<.>/? smell the cows +-- +TODO: 4 of 4 tasks shown +EOF + cat /dev/null > todo.txt test_todo_session 'prepend handling prepended date on add' <>> todo.sh -t add "new task" diff --git a/tests/t1600-append.sh b/tests/t1600-append.sh index ed3e436..e75de78 100755 --- a/tests/t1600-append.sh +++ b/tests/t1600-append.sh @@ -17,6 +17,12 @@ test_todo_session 'append usage' <>> todo.sh append 10 "hej!" +=== 1 +TODO: No task 10. +EOF + test_todo_session 'basic append' <>> todo.sh append 1 "smell the roses" 1 notice the daisies smell the roses @@ -37,11 +43,26 @@ test_todo_session 'basic append with &' < todo.txt <>> todo.sh append 1 "~@#$%^&*()-_=+[{]}|;:',<.>/?" +1 smell the cows ~@#$%^&*()-_=+[{]}|;:',<.>/? -test_todo_session 'append error' << EOF ->>> todo.sh append 10 "hej!" -=== 1 -TODO: No task 10. +>>> todo.sh append 2 '\`!\\"' +2 grow some corn \`!\\" + +>>> todo.sh list +4 chase the chickens +2 grow some corn \`!\\" +1 smell the cows ~@#$%^&*()-_=+[{]}|;:',<.>/? +3 thrash some hay +-- +TODO: 4 of 4 tasks shown EOF cat > todo.txt <