tests/test-check-execute.t
author Augie Fackler <augie@google.com>
Sun, 19 Mar 2017 01:11:00 -0400
changeset 31510 2244fb3eee49
parent 29219 3c9066ed557c
child 33116 6c113a7dec52
permissions -rw-r--r--
localrepo: forcibly copy list of filecache keys On Python 3, keys() is more like iterkeys(), so we got in trouble for mutating the dict while we're iterating here. Since the list of caches should be relatively small, work around this difference by just forcing a copy of the key list.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27569
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     1
#require test-repo execbit
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     2
29219
3c9066ed557c tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents: 27569
diff changeset
     3
  $ . "$TESTDIR/helpers-testrepo.sh"
27569
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     4
  $ cd "`dirname "$TESTDIR"`"
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     5
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     6
look for python scripts without the execute bit
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     7
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     8
  $ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")'
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
     9
  [1]
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    10
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    11
look for python scripts with execute bit but not shebang
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    12
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    13
  $ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")'
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    14
  [1]
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    15
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    16
look for shell scripts with execute bit but not shebang
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    17
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    18
  $ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")'
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    19
  [1]
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    20
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    21
look for non scripts with no shebang
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    22
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    23
  $ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")'
b3eba79b7e04 tests: add test-check-execute.t
timeless <timeless@mozdev.org>
parents:
diff changeset
    24
  [1]