Files
Joel Brobecker 8b5d28174e Remove all imports of __future__.print_functions in the testsuite
This commit is the result of running the following command in
the testsuite/ directory:

   $ sed -i '/^from\s\+__future__\s\+import\s\+print_function\s*$/d' \
       `git grep print_function | cut -d: -f1 | sort -u`

Change-Id: Idb18a24f5368434a505af42b347b8f2a1d0481b5
TN: U530-006
2021-11-30 17:58:55 +04:00

30 lines
857 B
Python
Executable File

#! /usr/bin/env python
"""A dummy cvs_check program...
"""
import sys
import os.path
filenames = sys.stdin.read().splitlines(False)
# To help with testing, print a trace containing the name of the module
# and the names of the files being checked.
print(
"cvs_check: %s < %s"
% (
" ".join(["`%s'" % arg for arg in sys.argv[1:]]),
" ".join(["`%s'" % arg for arg in filenames]),
),
file=sys.stderr,
)
# In this testcase, we expect the hooks to only ever call this script
# to check one file, and one file only: foo.c. For anything else,
# pretend there is a style check failure:
for filename in filenames:
base_filename = os.path.basename(filename)
if base_filename != "foo.c":
print(
("cvs_check ERROR: %s is missing a copyright header" % base_filename),
file=sys.stderr,
)