##// END OF EJS Templates
tests: unify test-config-case
tests: unify test-config-case

File last commit:

r11822:0cae834c default
r12082:5e2216a3 default
Show More
test-check-code
39 lines | 724 B | text/plain | TextLexer
Pierre-Yves David
add a small test for contrib/check-code.py...
r10715 #!/bin/sh
#cd `dirname $0`
cat > correct.py <<EOF
def toto(arg1, arg2):
del arg2
return (5 + 6, 9)
EOF
cat > wrong.py <<EOF
def toto( arg1, arg2):
del(arg2)
return ( 5+6, 9)
EOF
Benoit Boissinot
check-code: improve quote detection regexp, add tests
r10722 cat > quote.py <<EOF
Benoit Boissinot
check-code: more tests and more robust python filtering
r10727 # let's use quote in comments
Benoit Boissinot
check-code: improve quote detection regexp, add tests
r10722 (''' ( 4x5 )
Benoit Boissinot
check-code: more tests and more robust python filtering
r10727 but """\\''' and finally''',
Benoit Boissinot
check-code: improve quote detection regexp, add tests
r10722 """let's fool checkpatch""", '1+2',
'"""', 42+1, """and
( 4-1 ) """, "( 1+1 )\" and ")
Benoit Boissinot
check-code: more tests and more robust python filtering
r10727 a, '\\\\\\\\', "\\\\\\" x-2", "c-1"
Benoit Boissinot
check-code: improve quote detection regexp, add tests
r10722 EOF
Martin Geisler
check-code: fix check for any/all function...
r11341 cat > non-py24.py <<EOF
# Using builtins that does not exist in Python 2.4
if any():
x = all()
Martin Geisler
check-code: catch format(), introduced in Python 2.6
r11343 y = format(x)
Martin Geisler
check-code: fix check for any/all function...
r11341
# Do not complain about our own definition
def any(x):
pass
EOF
Pierre-Yves David
add a small test for contrib/check-code.py...
r10715 check_code=`dirname $0`/../contrib/check-code.py
Martin Geisler
check-code: fix check for any/all function...
r11341 ${check_code} ./wrong.py ./correct.py ./quote.py ./non-py24.py
Martin Geisler
test-check-code: fix test after e1359ad582f6
r11822
exit 0