Debian Codegraph @

tests/exec.tst

raw
1 #!/usr/bin/env python3
2 ## Test handling of executable bit
3
4 import sys, testlifter
5
6 testlifter.verbose += sys.argv[1:].count("-v")
7 repo = testlifter.CVSRepository("exec.repo")
8 repo.init()
9 repo.module("module")
10 co = repo.checkout("module", "exec.checkout")
11
12 # Should have M 100755
13 co.write("exec",
14 "Now is the time for all good shellscripts to come to the iid of their systems.\n")
15 co.add("exec")
16 co.outdo("chmod a+x exec")
17 co.commit("Committing executable file")
18
19 # Should have M 100644
20 co.write("nonexec",
21 "The quick brown fox jumped over the lazy dog.\n")
22 co.add("nonexec")
23 co.commit("Committing nonexecutable file.")
24
25 repo.cleanup()