sapling/tests/test-check-shbang-hg.t
Jun Wu fef5e81c64 test-check: do not trust system hg
Summary:
This diff removes "unset HGRCPATH" to try to run tests in a more
controlled environment. And skip the test if system HG looks broken.

Test Plan: arc unit

Reviewers: simpkins, #mercurial, stash

Reviewed By: stash

Subscribers: net-systems-diffs@fb.com, mjpieters, medson

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

Signature: t1:5263484:1497604378:28ec94c33ba77680c8d2325a8fa36457e0eb8c91
2017-06-16 10:57:52 -07:00

16 lines
398 B
Perl

#require test-repo
This file is backported from mercurial/tests/test-check-shbang.t.
$ . "$TESTDIR/helper-testrepo.sh"
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]