Merge branch 'the1ts/master'
This commit is contained in:
@@ -55,4 +55,18 @@ TODO: 'smell the uppercase Roses' added on line 3.
|
||||
TODO: 2 of 3 tasks shown from $HOME/todo.txt
|
||||
EOF
|
||||
|
||||
test_todo_session 'add with &' <<EOF
|
||||
>>> todo.sh add "dig the garden & water the flowers"
|
||||
TODO: 'dig the garden & water the flowers' added on line 4.
|
||||
|
||||
>>> todo.sh list
|
||||
4 dig the garden & water the flowers
|
||||
1 notice the daisies
|
||||
2 smell the roses
|
||||
3 smell the uppercase Roses
|
||||
--
|
||||
TODO: 4 of 4 tasks shown from $HOME/todo.txt
|
||||
|
||||
EOF
|
||||
|
||||
test_done
|
||||
|
||||
@@ -72,6 +72,12 @@ TODO: 4 prioritized (A).
|
||||
replaced with
|
||||
4: (A) collect the bread
|
||||
EOF
|
||||
test_todo_session 'replace with &' << EOF
|
||||
>>> todo.sh replace 3 "thrash the hay & thresh the wheat"
|
||||
3: jump on hay
|
||||
replaced with
|
||||
3: thrash the hay & thresh the wheat
|
||||
EOF
|
||||
|
||||
test_todo_session 'replace error' << EOF
|
||||
>>> todo.sh replace 10 "hej!"
|
||||
|
||||
@@ -52,4 +52,9 @@ TODO: 3 of 3 tasks shown from $HOME/todo.txt
|
||||
|
||||
EOF
|
||||
|
||||
test_todo_session 'prepend with &' <<EOF
|
||||
>>> todo.sh prepend 3 "no running & jumping now"
|
||||
3: no running & jumping now stop
|
||||
EOF
|
||||
|
||||
test_done
|
||||
|
||||
47
tests/t1600-append.sh
Executable file
47
tests/t1600-append.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_description='basic append functionality
|
||||
|
||||
Ensure we can append items successfully.
|
||||
'
|
||||
. ./test-lib.sh
|
||||
|
||||
#
|
||||
# Set up the basic todo.txt
|
||||
#
|
||||
todo.sh add notice the daisies > /dev/null
|
||||
|
||||
test_todo_session 'append usage' <<EOF
|
||||
>>> todo.sh append adf asdfa
|
||||
=== 1
|
||||
usage: todo.sh append ITEM# "TEXT TO APPEND"
|
||||
EOF
|
||||
|
||||
test_todo_session 'basic append' <<EOF
|
||||
>>> todo.sh append 1 "smell the roses"
|
||||
1: notice the daisies smell the roses
|
||||
|
||||
>>> todo.sh list
|
||||
1 notice the daisies smell the roses
|
||||
--
|
||||
TODO: 1 of 1 tasks shown from $HOME/todo.txt
|
||||
EOF
|
||||
|
||||
test_todo_session 'basic append with &' <<EOF
|
||||
>>> todo.sh append 1 "see the wasps & bees"
|
||||
1: notice the daisies smell the roses see the wasps & bees
|
||||
|
||||
>>> todo.sh list
|
||||
1 notice the daisies smell the roses see the wasps & bees
|
||||
--
|
||||
TODO: 1 of 1 tasks shown from $HOME/todo.txt
|
||||
EOF
|
||||
|
||||
|
||||
test_todo_session 'append error' << EOF
|
||||
>>> todo.sh append 10 "hej!"
|
||||
=== 1
|
||||
10: No such todo.
|
||||
EOF
|
||||
|
||||
test_done
|
||||
Reference in New Issue
Block a user