view tests/test-check-execute.t @ 33154:4ecc6047d45f

log: add an extension hook-point in changeset_printer Extensions sometimes wants to add other information in the default log output format (when no templating is used). Add an empty function named '_exthook' for easing the extension life. Extensions will be able to wrap this function and collaborate to display additional information. Exthook is called after displaying troubles and just before displaying the files, extra and description. Add a new test file to test it and not pollute other test files.
author Boris Feld <boris.feld@octobus.net>
date Mon, 26 Jun 2017 15:46:24 +0200
parents 6c113a7dec52
children ddd65b4f3ae6
line wrap: on
line source

#require test-repo execbit

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

look for python scripts without the execute bit

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

look for python scripts with execute bit but not shebang

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

look for shell scripts with execute bit but not shebang

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

look for non scripts with no shebang

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