##// END OF EJS Templates
check-code: improve quote detection regexp, add tests
check-code: improve quote detection regexp, add tests

File last commit:

r10722:c4fb2103 default
r10722:c4fb2103 default
Show More
test-check-code
24 lines | 448 B | text/plain | TextLexer
#!/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
cat > quote.py <<EOF
(''' ( 4x5 )
but """\''' and finally''',
"""let's fool checkpatch""", '1+2',
'"""', 42+1, """and
( 4-1 ) """, "( 1+1 )\" and ")
EOF
check_code=`dirname $0`/../contrib/check-code.py
${check_code} ./wrong.py ./correct.py ./quote.py