diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2014-01-10 17:45:51 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2014-01-10 17:45:51 +0100 |
| commit | 25dabec661637ca5cab1a9047a76bee05cfa653f (patch) | |
| tree | 081a2419511b53ad15c0eeb41366bb85807123b6 /tests/test_grouping.py | |
| parent | 524a1e59d1c700337bcbd9ac198db3680c7d5829 (diff) | |
| download | sqlparse-25dabec661637ca5cab1a9047a76bee05cfa653f.tar.gz | |
Improve parsing of string literals in columns.
Diffstat (limited to 'tests/test_grouping.py')
| -rw-r--r-- | tests/test_grouping.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py index 24b50dc..38c1f66 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -238,6 +238,12 @@ def test_identifier_with_op_trailing_ws(): assert p.tokens[1].ttype is T.Whitespace +def test_identifier_with_string_literals(): + p = sqlparse.parse('foo + \'bar\'')[0] + assert len(p.tokens) == 1 + assert isinstance(p.tokens[0], sql.Identifier) + + # This test seems to be wrong. It was introduced when fixing #53, but #111 # showed that this shouldn't be an identifier at all. I'm leaving this # commented in the source for a while. |
