BUG: task listing aborted on embedded \c escape sequence
Fixed by removing the -e option that causes the echo command to interpret escape characters. Coloring of done tasks (the only step in the _list pipeline that required this interpretation) has been moved into the AWK pipeline step which is responsible for the priority coloring, and which does the escape character interpretation internally. As a nice side effect, this shortening of the _list pipeline should also speed up the listing a wee bit.
This commit is contained in:
33
tests/t1340-listescapes.sh
Executable file
33
tests/t1340-listescapes.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
test_description='list with escape sequences
|
||||
|
||||
This test checks listing of tasks that have embedded escape sequences in them.
|
||||
'
|
||||
. ./test-lib.sh
|
||||
|
||||
#
|
||||
# check aborted list output on \c escape sequence
|
||||
#
|
||||
cat > todo.txt <<'EOF'
|
||||
first todo
|
||||
second todo run C:\WINDOWS\sysnative\cscript.exe
|
||||
third todo
|
||||
EOF
|
||||
|
||||
test_todo_session 'aborted list output on backslash-c' <<'EOF'
|
||||
>>> todo.sh ls
|
||||
1 first todo
|
||||
2 second todo run C:\\\\WINDOWS\\\\sysnative\\\\cscript.exe
|
||||
3 third todo
|
||||
--
|
||||
TODO: 3 of 3 tasks shown
|
||||
|
||||
>>> todo.sh ls 2
|
||||
2 second todo run C:\\\\WINDOWS\\\\sysnative\\\\cscript.exe
|
||||
--
|
||||
TODO: 1 of 3 tasks shown
|
||||
EOF
|
||||
|
||||
test_done
|
||||
Reference in New Issue
Block a user