diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2011-03-17 09:41:39 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2011-03-17 09:41:39 +0100 |
| commit | 92ccbfc012107a6b6ea27b51fa1c609ac449ce66 (patch) | |
| tree | 3eda4d49dcb70eedc6698003efa606ddbede670b /tests | |
| parent | 2bd7658034545aa7db5752cd35d400526af5439e (diff) | |
| download | sqlparse-92ccbfc012107a6b6ea27b51fa1c609ac449ce66.tar.gz | |
Ignore case in token.match() for all keyword types (fixes issue34).
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_regressions.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_regressions.py b/tests/test_regressions.py new file mode 100644 index 0000000..0d65ef7 --- /dev/null +++ b/tests/test_regressions.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +import unittest + +import sqlparse +from sqlparse import tokens + + +class RegressionTests(unittest.TestCase): + + def test_issue34(self): + t = sqlparse.parse("create")[0].token_first() + self.assertEqual(t.match(tokens.Keyword.DDL, "create"), True) + self.assertEqual(t.match(tokens.Keyword.DDL, "CREATE"), True) |
