changeset 2276:e56af6f9b2cc

tests: test for crlf in Python sourcecode
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 02 Jul 2007 16:20:30 +0200
parents 023e0f0d264e
children 5638ffa2fb38
files MoinMoin/_tests/test_sourcecode.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_sourcecode.py	Mon Jul 02 16:06:54 2007 +0200
+++ b/MoinMoin/_tests/test_sourcecode.py	Mon Jul 02 16:20:30 2007 +0200
@@ -13,7 +13,11 @@
 ROOT = str(moindir)
 
 EXCLUDE = [
-     '/MoinMoin/support', # 3rd party libs or non-broken stdlib stuff
+        '/wiki/config/mailimportconf.py',
+        '/MoinMoin/formatter/text_html.py',
+        '/MoinMoin/parser/text_diff.py',
+    '/contrib/DesktopEdition/setup_py2exe.py', # has crlf
+    '/MoinMoin/support', # 3rd party libs or non-broken stdlib stuff
     '/wiki/htdocs/applets/FCKeditor', # 3rd party GUI editor
 ]
 
@@ -30,8 +34,9 @@
                 f = open(path, 'r')
                 data = f.read()
                 f.close()
-                assert '\t' not in data, "%r contains tabs!" % (reldir,)
+                assert '\t' not in data, "%r contains tabs (please use 4 space chars for indenting)!" % (reldir,)
                 assert not data or data.endswith('\n'), "%r does not end with a newline char!" % (reldir,)
+                assert '\r\n' not in data, "%r contains crlf line endings (please use UNIX style, lf only)!" % (reldir,)
         elif os.path.isdir(path):
             for entry in os.listdir(path):
                 if not entry.startswith('.'):