Pull request #26 by trajano (e24777fa2c) changed `...` to $(...), but the following commit7900ad7e1balready added another old-style one. I think the tests can also be used for some simple enforcement of coding style, so here is a first shot at it. Closes #46
16 lines
382 B
Bash
Executable File
16 lines
382 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 $(...).
|
|
'
|
|
. ./test-lib.sh
|
|
|
|
test_todo_session 'no old-style backtick command substitution' <<EOF
|
|
>>> sed -n -e 's/[ \t]#.*//' -e '/\d96/{=;p}' "$(which todo.sh)"
|
|
EOF
|
|
|
|
test_done
|