Added test for del preserving line numbers.
This commit is contained in:
@@ -44,6 +44,47 @@ TODO: 1 deleted.
|
|||||||
TODO: 2 of 2 tasks shown
|
TODO: 2 of 2 tasks shown
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cat > todo.txt <<EOF
|
||||||
|
(B) smell the uppercase Roses +flowers @outside
|
||||||
|
(A) notice the sunflowers
|
||||||
|
stop
|
||||||
|
EOF
|
||||||
|
test_todo_session 'del preserving line numbers' <<EOF
|
||||||
|
>>> todo.sh -f del 1
|
||||||
|
1: (B) smell the uppercase Roses +flowers @outside
|
||||||
|
TODO: 1 deleted.
|
||||||
|
|
||||||
|
>>> todo.sh -f del 1
|
||||||
|
1: No such task.
|
||||||
|
=== 1
|
||||||
|
|
||||||
|
>>> todo.sh add A new task
|
||||||
|
4: A new task
|
||||||
|
TODO: 4 added.
|
||||||
|
|
||||||
|
>>> todo.sh -p list
|
||||||
|
2 (A) notice the sunflowers
|
||||||
|
4 A new task
|
||||||
|
3 stop
|
||||||
|
--
|
||||||
|
TODO: 3 of 3 tasks shown
|
||||||
|
|
||||||
|
>>> todo.sh -f -n del 2
|
||||||
|
2: (A) notice the sunflowers
|
||||||
|
TODO: 2 deleted.
|
||||||
|
|
||||||
|
>>> todo.sh add Another new task
|
||||||
|
3: Another new task
|
||||||
|
TODO: 3 added.
|
||||||
|
|
||||||
|
>>> todo.sh -p list
|
||||||
|
2 A new task
|
||||||
|
3 Another new task
|
||||||
|
1 stop
|
||||||
|
--
|
||||||
|
TODO: 3 of 3 tasks shown
|
||||||
|
EOF
|
||||||
|
|
||||||
cat > todo.txt <<EOF
|
cat > todo.txt <<EOF
|
||||||
(B) smell the uppercase Roses +flowers @outside
|
(B) smell the uppercase Roses +flowers @outside
|
||||||
(A) notice the sunflowers
|
(A) notice the sunflowers
|
||||||
|
|||||||
Reference in New Issue
Block a user