Add some test cases for multiline strings.
authorGreg Ward <greg@gerg.ca>
Fri, 8 Nov 2013 19:59:38 +0000 (14:59 -0500)
committerGreg Ward <greg@gerg.ca>
Fri, 8 Nov 2013 21:19:20 +0000 (16:19 -0500)
Since I'm about to add special treatment of multiline strings, I
thought it best to ensure that we preserve the existing behaviour.

testsuite/E50.py
testsuite/W19.py
testsuite/W29.py

index 4cc43830461f8757f0c6b9ec53ba6d6632bf432f..1fc95ff7b8390f5398ef3d274011a7b4594bf18e 100644 (file)
@@ -45,3 +45,11 @@ ddd = \
 ('''
     ''' + ' \
 ')
+#
+#: E501
+'''multiline string
+with a long long long long long long long long long long long long long long long long line
+'''
+#: E501
+'''same thing, but this time without a terminal newline in the string
+long long long long long long long long long long long long long long long long line'''
index c81f46f34b602d066d1b40657ffbd93f9570aef6..ac2095bec89faa2ff3866a2ddbd2ac0e9f91533f 100644 (file)
@@ -97,6 +97,14 @@ if length > options.max_line_length:
 if os.path.exists(os.path.join(path, PEP8_BIN)):
        cmd = ([os.path.join(path, PEP8_BIN)] +
               self._pep8_options(targetfile))
+#: W191
+'''
+       multiline string with tab in it'''
+#: E101 W191
+'''multiline string
+       with tabs
+   and spaces
+'''
 #: E101 W191
 if foo is None and bar is "frop" and \
         blah == 'yeah':
index 2578f4f48f52bfaaf70ef5f878075090cf84aeed..42802ca82106c40060efb9f5155285411a7816e0 100644 (file)
@@ -6,5 +6,8 @@ print
 class Foo(object):
     
     bang = 12
+#: W291
+'''multiline
+string with trailing whitespace'''   
 #: W292
 # This line doesn't have a linefeed
\ No newline at end of file