BUG: Multiple whitespace was condensed, CR/LF not turned to space.
Missing quoting inside cleaninput() condensed multiple subsequent spaces into a single space, even when the user took pains to preserve whitespace by properly quoting the task in the shell. The 'tr' command completely removed CR and LF characters instead of replacing them with a single space. Add test cases for the whitespace handling to the add, append, prepend and replace actions.
This commit is contained in:
committed by
Gina Trapani
parent
301dbcf297
commit
899687f0ef
@@ -43,6 +43,12 @@ test_todo_session 'basic append with &' <<EOF
|
||||
TODO: 1 of 1 tasks shown
|
||||
EOF
|
||||
|
||||
echo 'jump on hay' > todo.txt
|
||||
test_todo_session 'append with spaces' <<EOF
|
||||
>>> todo.sh append 1 "and notice the three spaces"
|
||||
1 jump on hay and notice the three spaces
|
||||
EOF
|
||||
|
||||
cat > todo.txt <<EOF
|
||||
smell the cows
|
||||
grow some corn
|
||||
|
||||
Reference in New Issue
Block a user