Add test to enforce use of $(...) code style in todo.sh.

Pull request #26 by trajano (e24777fa2c) changed `...` to $(...), but the following commit 7900ad7e1b already 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
This commit is contained in:
Ingo Karkat
2011-07-09 16:46:51 +02:00
committed by Gina Trapani
parent f3af778d3e
commit 2891472630
2 changed files with 16 additions and 1 deletions

View File

@@ -621,7 +621,7 @@ _addto() {
if [[ $TODOTXT_DATE_ON_ADD = 1 ]]; then
now=$(date '+%Y-%m-%d')
input=`echo "$input" | sed -e 's/^\(([A-Z]) \)\{0,1\}/\1'"$now /"`
input=$(echo "$input" | sed -e 's/^\(([A-Z]) \)\{0,1\}/\1'"$now /")
fi
echo "$input" >> "$file"
if [ $TODOTXT_VERBOSE -gt 0 ]; then