Made verbose message of _addto() consistent with other task messages.
In verbose mode, commands first print the updated task, then summarize the change in the following line. The add/addm/addto commands deviated from this, using "TODO: '<task>' added on line N." This change splits this into two separate lines, obsoletes the implementation jargon of "line", and makes it easier to visually parse the message. This is also a preparation for a possible future use of a _list()-like function, so that the updated task is processed and highlighted like the normal task output.
This commit is contained in:
committed by
Gina Trapani
parent
821b9d2795
commit
9f03cf6847
@@ -33,7 +33,8 @@ fi
|
||||
|
||||
## Add test
|
||||
# Create the expected file
|
||||
echo "TODO: 'eat apples eat oranges drink milk' added on line 2.">$HOME/expect.multi
|
||||
echo "2: eat apples eat oranges drink milk
|
||||
TODO: 2 added.">$HOME/expect.multi
|
||||
|
||||
test_expect_success 'multiline squash item add' '
|
||||
(
|
||||
@@ -108,9 +109,12 @@ fi
|
||||
|
||||
## Multiple line addition
|
||||
# Create the expected file
|
||||
echo "TODO: 'eat apples' added on line 2." > $HOME/expect.multi
|
||||
echo "TODO: 'eat oranges' added on line 3." >>$HOME/expect.multi
|
||||
echo "TODO: 'drink milk' added on line 4." >> $HOME/expect.multi
|
||||
echo "2: eat apples
|
||||
TODO: 2 added." > $HOME/expect.multi
|
||||
echo "3: eat oranges
|
||||
TODO: 3 added." >>$HOME/expect.multi
|
||||
echo "4: drink milk
|
||||
TODO: 4 added." >> $HOME/expect.multi
|
||||
|
||||
test_expect_success 'actual multiline add' '
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user