diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2014-08-08 12:59:51 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2014-08-08 12:59:51 +0200 |
| commit | 81479273e5e669abfcd410c4bc85dd39bf89bb2e (patch) | |
| tree | e2ada6890d9120d84a353614aadd333412cf450e /tests/test_parse.py | |
| parent | 8f5f638b1a0c0759adf122450f9027f47a4a220e (diff) | |
| parent | 8ffe95af292e0930b7126aae1905a97f7ebdfb24 (diff) | |
| download | sqlparse-81479273e5e669abfcd410c4bc85dd39bf89bb2e.tar.gz | |
Merge pull request #143 from fusionbox/master
Handle modulo operator without spaces
Diffstat (limited to 'tests/test_parse.py')
| -rw-r--r-- | tests/test_parse.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py index 6d7f7df..d77bb43 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -99,6 +99,10 @@ class SQLParseTest(TestCaseBase): self.assert_(t[-1].ttype is sqlparse.tokens.Name.Placeholder) self.assertEqual(t[-1].value, '$a') + def test_modulo_not_placeholder(self): + tokens = list(sqlparse.lexer.tokenize('x %3')) + self.assertEqual(tokens[2][0], sqlparse.tokens.Operator) + def test_access_symbol(self): # see issue27 t = sqlparse.parse('select a.[foo bar] as foo')[0].tokens self.assert_(isinstance(t[-1], sqlparse.sql.Identifier)) |
