Mercurial > hg
comparison tests/test-check-code @ 10715:83dce0f817f4
add a small test for contrib/check-code.py
This changeset adds a test file for contrib/check-code.py. This test runs
check-code.py against two small files. The first file should not raise any
check-code.py error while the second should. A line contains multiple errors to
verify the check-code.py behaviour: In the case of multiple errors at the same
line, the context line should only be displayed once.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 16 Mar 2010 19:52:55 +0100 |
parents | |
children | c4fb2103e734 |
comparison
equal
deleted
inserted
replaced
10714:9c0a1887bd4b | 10715:83dce0f817f4 |
---|---|
1 #!/bin/sh | |
2 #cd `dirname $0` | |
3 cat > correct.py <<EOF | |
4 def toto(arg1, arg2): | |
5 del arg2 | |
6 return (5 + 6, 9) | |
7 EOF | |
8 | |
9 cat > wrong.py <<EOF | |
10 def toto( arg1, arg2): | |
11 del(arg2) | |
12 return ( 5+6, 9) | |
13 EOF | |
14 | |
15 check_code=`dirname $0`/../contrib/check-code.py | |
16 ${check_code} ./wrong.py ./correct.py |