sapling/tests/test-check-execute.t
Saurabh Singh cf825689ed facebook-hg-rpms: fix the tests due to D6700605
Summary:
D6700605 exposed new code to tests which resulted in some issues. This
commit addresses those test failures.

Test Plan: Ran all the tests.

Reviewers: phillco, #mercurial, #sourcecontrol

Reviewed By: phillco

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

Signature: 6700784:1515640770:034c3ccd602abc0b546d3936a31418803c17247b
2018-01-10 19:19:46 -08:00

26 lines
681 B
Perl

#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")'
fb/facebook-hg-rpms/hgsql_getdb.sh
fb/tests/getdb.sh
look for non scripts with no shebang
$ testrepohg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")'
[1]