From cff61bb93a080c1becbf2c6cd33911bc206cf587 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Mon, 11 Mar 2019 12:45:11 +0100 Subject: Avoid formatting of psql commands (fixes #469). --- tests/test_tokenize.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_tokenize.py') diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py index 23a5157..fcd1102 100644 --- a/tests/test_tokenize.py +++ b/tests/test_tokenize.py @@ -195,3 +195,9 @@ def test_parse_order_by(): p = sqlparse.parse('ORDER BY')[0] assert len(p.tokens) == 1 assert p.tokens[0].ttype is T.Keyword + + +def test_cli_commands(): + p = sqlparse.parse('\\copy')[0] + assert len(p.tokens) == 1 + assert p.tokens[0].ttype == T.Command -- cgit v1.2.1