Tests: Extract backtick_check().

This commit is contained in:
Ingo Karkat
2012-04-15 10:33:51 +02:00
parent ebe6a403c8
commit 3e82f3ca56

View File

@@ -9,8 +9,13 @@ 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 "$(which todo.sh)"
EOF
test_done