[pypy-svn] r69263 - pypy/branch/io-lang/pypy/lang/io/test

david at codespeak.net david at codespeak.net
Fri Nov 13 15:19:06 CET 2009


Author: david
Date: Fri Nov 13 15:19:06 2009
New Revision: 69263

Modified:
   pypy/branch/io-lang/pypy/lang/io/test/test_lexer.py
Log:
Lexer tests for the comma token

Modified: pypy/branch/io-lang/pypy/lang/io/test/test_lexer.py
==============================================================================
--- pypy/branch/io-lang/pypy/lang/io/test/test_lexer.py	(original)
+++ pypy/branch/io-lang/pypy/lang/io/test/test_lexer.py	Fri Nov 13 15:19:06 2009
@@ -175,4 +175,9 @@
     tokens = iolexer.tokenize(inp)
     assert tokens[0] == Token('Identifier', 'curlyBrackets', SourcePos(0, 0, 0))
     assert tokens[1] == Token('OpenParen', '{', SourcePos(0, 0, 0))
-    assert tokens[2] == Token('CloseParen', '}', SourcePos(1, 0, 1))
\ No newline at end of file
+    assert tokens[2] == Token('CloseParen', '}', SourcePos(1, 0, 1))
+    
+def test_lex_comma_token():
+    inp = '(1, 2)'
+    tokens = iolexer.tokenize(inp)
+    assert tokens[3] == Token('Comma', ',', SourcePos(2, 0, 2))
\ No newline at end of file



More information about the Pypy-commit mailing list