summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2017-01-03 12:22:34 +0100
committerMichal Čihař <michal@cihar.com>2017-01-03 12:22:34 +0100
commit7f6d565ba0eea6ab76c02e9e7826722585bd9f86 (patch)
treefc73d6100a32a7a0ddc14f178f3170dbe63ac2d8
parent78ccdb20835eafcffbe8e683624d91ba4ac35f6d (diff)
downloadsql-parser-7f6d565ba0eea6ab76c02e9e7826722585bd9f86.zip
sql-parser-7f6d565ba0eea6ab76c02e9e7826722585bd9f86.tar.gz
sql-parser-7f6d565ba0eea6ab76c02e9e7826722585bd9f86.tar.bz2
Add test for text formatter
Issue #110 Signed-off-by: Michal Čihař <michal@cihar.com>
-rw-r--r--tests/Utils/CLITest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/Utils/CLITest.php b/tests/Utils/CLITest.php
index 8ef5792..21adde4 100644
--- a/tests/Utils/CLITest.php
+++ b/tests/Utils/CLITest.php
@@ -37,6 +37,11 @@ class CLITest extends TestCase
0,
),
array(
+ array('q' => 'SELECT /* comment */ 1 /* other */', 'f' => 'text'),
+ "SELECT\n /* comment */ 1 /* other */\n",
+ 0,
+ ),
+ array(
array('q' => 'SELECT 1', 'f' => 'foo'),
"ERROR: Invalid value for format!\n",
1,