Files
todo.txt-cli/tests/t1400-prepend.sh
Jared Cordasco b6467eaa64 Updated _list() output to match updated addto. Adjusted tests to match.
- _list() now shows the capitalized filename in place of 'TODO:'.
  For example, listing garden.txt produces a output prefixed by 'GARDEN:'
  This eliminates the ' from $FILE' part of the _list() output. All tests
  were adjusted to match this new output.
2010-01-12 14:42:02 -05:00

1.1 KiB
Executable File

#!/bin/sh
 
test_description='basic prepend functionality
'
. ./test-lib.sh
 
test_todo_session 'prepend usage' <<EOF
>>> todo.sh prepend B B
usage: todo.sh prepend ITEM# "TEXT TO PREPEND"
=== 1
EOF
 
cat > todo.txt <<EOF
(B) smell the uppercase Roses +flowers @outside
notice the sunflowers
stop
EOF
test_todo_session 'basic prepend' <<EOF
>>> todo.sh list
1 (B) smell the uppercase Roses +flowers @outside
2 notice the sunflowers
3 stop
--
TODO: 3 of 3 tasks shown
 
>>> todo.sh -p list
1 (B) smell the uppercase Roses +flowers @outside
2 notice the sunflowers
3 stop
--
TODO: 3 of 3 tasks shown
 
>>> todo.sh prepend 2 test
2: test notice the sunflowers
 
>>> todo.sh -p list
1 (B) smell the uppercase Roses +flowers @outside
3 stop
2 test notice the sunflowers
--
TODO: 3 of 3 tasks shown
 
>>> todo.sh prepend 1 test
1: (B) test smell the uppercase Roses +flowers @outside
 
>>> todo.sh -p list
1 (B) test smell the uppercase Roses +flowers @outside
3 stop
2 test notice the sunflowers
--
TODO: 3 of 3 tasks shown
 
EOF
 
test_todo_session 'prepend with &' <<EOF
>>> todo.sh prepend 3 "no running & jumping now"
3: no running & jumping now stop
EOF
 
test_done