test-check: backport test-check-shbang from core hg

Summary:
This is the last one of the test-check series.
`test-check-py3-compat.t` was ignored intentionally as we do not care about
Python 3 support right now.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4039479

Signature: t1:4039479:1476876594:5b95aad9be245a86dc9327770502830896273131
This commit is contained in:
Jun Wu 2016-10-18 22:28:50 +01:00
parent 813a2b3e0c
commit 5e1c83f5b1

View File

@ -0,0 +1,16 @@
#require test-repo
This file is backported from mercurial/tests/test-check-shbang.t.
$ . "$RUNTESTDIR/helpers-testrepo.sh"
$ cd "$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]