Files
todo.txt-cli/tests/t0100-code-nobacktick.sh
Ingo Karkat 728bc564a1 nobacktick test: Use literal backtick in test.
With proper quoting, the non-POSIX \d96 escape isn't necessary, and the check should work also on Mac OS.
2011-07-18 13:41:38 +02:00

17 lines
462 B
Bash
Executable File

#!/bin/sh
test_description='no old-style backtick command substitution
This test checks the todo.sh script itself for occurrences
of old-style backtick command substitution, which should be
replaced with $(...).
On failure, it will print each offending line number and line.
'
. ./test-lib.sh
test_todo_session 'no old-style backtick command substitution' <<EOF
>>> sed -n -e 's/\(^\|[ \t]\)#.*//' -e '/\`/{' -e '=;p' -e '}' "$(which todo.sh)"
EOF
test_done