# HG changeset patch # User Mads Kiilerich # Date 1335139008 -7200 # Node ID c326fe884daa0bbf8ddc09c0f02787d22801c258 # Parent abbabbbe4ec2e0d95f6b02cf6c303e970b927b11 tests: avoid tab indent on all kinds of lines of sh commands diff -r abbabbbe4ec2 -r c326fe884daa contrib/check-code.py --- a/contrib/check-code.py Mon Apr 23 01:56:48 2012 +0200 +++ b/contrib/check-code.py Mon Apr 23 01:56:48 2012 +0200 @@ -76,6 +76,7 @@ (r'if\s*!', "don't use '!' to negate exit status"), (r'/dev/u?random', "don't use entropy, use /dev/zero"), (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"), + (r'^( *)\t', "don't use tabs to indent"), ], # warnings [] @@ -87,7 +88,6 @@ ] uprefix = r"^ \$ " -uprefixc = r"^ > " utestpats = [ [ (r'^(\S| $ ).*(\S[ \t]+|^[ \t]+)\n', "trailing whitespace on non-output"), @@ -98,7 +98,6 @@ "explicit exit code checks unnecessary"), (uprefix + r'set -e', "don't use set -e"), (uprefix + r'\s', "don't indent commands, use > for continued lines"), - (uprefixc + r'( *)\t', "don't use tabs to indent"), ], # warnings [] diff -r abbabbbe4ec2 -r c326fe884daa tests/test-convert-p4-filetypes --- a/tests/test-convert-p4-filetypes Mon Apr 23 01:56:48 2012 +0200 +++ b/tests/test-convert-p4-filetypes Mon Apr 23 01:56:48 2012 +0200 @@ -44,7 +44,7 @@ T2=`echo $T | tr [:upper:] [:lower:]` case $T in apple) - ;; + ;; symlink*) echo "this is target $T" >target_$T2 ln -s target_$T file_$T2 @@ -52,7 +52,7 @@ p4 add -t $T file_$T2 ;; binary*) - python -c "file('file_$T2', 'wb').write('this is $T')" + python -c "file('file_$T2', 'wb').write('this is $T')" p4 add -t $T file_$T2 ;; *)