2010-03-16 21:52:55 +03:00
|
|
|
#!/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
|
|
|
|
|
2010-03-17 16:15:33 +03:00
|
|
|
cat > quote.py <<EOF
|
2010-03-18 18:32:03 +03:00
|
|
|
# let's use quote in comments
|
2010-03-17 16:15:33 +03:00
|
|
|
(''' ( 4x5 )
|
2010-03-18 18:32:03 +03:00
|
|
|
but """\\''' and finally''',
|
2010-03-17 16:15:33 +03:00
|
|
|
"""let's fool checkpatch""", '1+2',
|
|
|
|
'"""', 42+1, """and
|
|
|
|
( 4-1 ) """, "( 1+1 )\" and ")
|
2010-03-18 18:32:03 +03:00
|
|
|
a, '\\\\\\\\', "\\\\\\" x-2", "c-1"
|
2010-03-17 16:15:33 +03:00
|
|
|
EOF
|
|
|
|
|
2010-03-16 21:52:55 +03:00
|
|
|
check_code=`dirname $0`/../contrib/check-code.py
|
2010-03-17 16:15:33 +03:00
|
|
|
${check_code} ./wrong.py ./correct.py ./quote.py
|