Browse files

nobacktick test: Use literal backtick

* Fix sed error on Mac OS, also ignore entire commented lines.
* With proper quoting, the non-POSIX \d96 escape isn't necessary, and the check should work also on Mac OS.
  • Loading branch information...
inkarkat authored and ginatrapani committed Jul 11, 2011
1 parent 8f6070e commit 72fe73f3d8b2ec51e04e86211f5365cb0d551d20
Showing with 2 additions and 1 deletion.
  1. +2 −1 tests/
@@ -5,11 +5,12 @@ test_description='no old-style backtick command substitution
This test checks the 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_todo_session 'no old-style backtick command substitution' <<EOF
->>> sed -n -e 's/[ \t]#.*//' -e '/\d96/{=;p}' "$(which"
+>>> sed -n -e 's/\(^\|[ \t]\)#.*//' -e '/\`/{' -e '=;p' -e '}' "$(which"

0 comments on commit 72fe73f

Please sign in to comment.