tests/test-check-shbang.t
author Jun Wu <quark@fb.com>
Tue, 09 Aug 2016 16:45:28 +0100
changeset 29773 39149b6036e6
parent 29515 bd18c2178fac
child 32957 cad62cb3c84c
permissions -rw-r--r--
dispatch: split global error handling out so it can be reused We may want a similar error handling at worker.py. This patch extracts the error handling logic to "callcatch" so it can be reused.

#require test-repo

  $ . "$TESTDIR/helpers-testrepo.sh"
  $ cd "`dirname "$TESTDIR"`"

look for python scripts that do not use /usr/bin/env

  $ hg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bi{1}n/env python")'
  [1]

look for shell scripts that do not use /bin/sh

  $ hg files 'set:grep(r"^#!.*/bi{1}n/sh") and not grep(r"^#!/bi{1}n/sh")'
  [1]