mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Merged revisions 88661 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r88661 | benjamin.peterson | 2011-02-26 16:06:24 -0600 (Sat, 26 Feb 2011) | 6 lines fix refactoring on formfeed characters #11250 This is because text.splitlines() is not the same as list(StringIO.StringIO(text)). ........
This commit is contained in:
parent
d8a43b4a4b
commit
2e7965e8b0
3 changed files with 14 additions and 10 deletions
|
|
@ -18,6 +18,16 @@ import os
|
|||
# Local imports
|
||||
from lib2to3.pgen2 import tokenize
|
||||
from ..pgen2.parse import ParseError
|
||||
from lib2to3.pygram import python_symbols as syms
|
||||
|
||||
|
||||
class TestDriver(support.TestCase):
|
||||
|
||||
def test_formfeed(self):
|
||||
s = """print 1\n\x0Cprint 2\n"""
|
||||
t = driver.parse_string(s)
|
||||
self.assertEqual(t.children[0].children[0].type, syms.print_stmt)
|
||||
self.assertEqual(t.children[1].children[0].type, syms.print_stmt)
|
||||
|
||||
|
||||
class GrammarTest(support.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue