Merge pull request #84 from inkarkat/config-backtick-check

Config backtick check
This commit is contained in:
Gina Trapani
2012-05-11 09:23:45 -07:00
2 changed files with 9 additions and 2 deletions

View File

@@ -9,8 +9,15 @@ On failure, it will print each offending line number and line.
'
. ./test-lib.sh
backtick_check()
{
sed -n -e 's/\(^\|[ \t]\)#.*//' -e '/`/{' -e '=;p' -e '}' "$@"
}
test_todo_session 'no old-style backtick command substitution' <<EOF
>>> sed -n -e 's/\(^\|[ \t]\)#.*//' -e '/\`/{' -e '=;p' -e '}' "$(which todo.sh)"
>>> backtick_check bin/todo.sh
>>> backtick_check ../../todo.cfg
EOF
test_done

View File

@@ -2,7 +2,7 @@
# Your todo.txt directory
#export TODO_DIR="/Users/gina/Documents/todo"
export TODO_DIR=`dirname "$0"`
export TODO_DIR=$(dirname "$0")
# Your todo/done/report.txt locations
export TODO_FILE="$TODO_DIR/todo.txt"