tests/test-check-execute.t
author Ian Moody <moz-ian@perix.co.uk>
Fri, 07 Jun 2019 20:19:55 +0100
changeset 42431 29528c4235a1
parent 33204 ddd65b4f3ae6
child 51000 fb6593307e24
permissions -rw-r--r--
phabricator: add commenting to phabsend for new/updated Diffs Especially useful when sending updates to existing Revisions so one can specify the sort of changes e.g. "Address review comments" or "Rebase to tip" If the diff content hasn't changed then it only needs a metadata update which doesn't show in the Phabricator updates UI, so don't add a comment that will. Differential Revision: https://phab.mercurial-scm.org/D6496

#require test-repo execbit

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

look for python scripts without the execute bit

  $ testrepohg files 'set:**.py and not exec() and grep(r"^#!.*?python")'
  [1]

look for python scripts with execute bit but not shebang

  $ testrepohg files 'set:**.py and exec() and not grep(r"^#!.*?python")'
  [1]

look for shell scripts with execute bit but not shebang

  $ testrepohg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")'
  [1]

look for non scripts with no shebang

  $ testrepohg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")'
  [1]