summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2016-09-13 15:05:02 +0200
committerMichal Čihař <michal@cihar.com>2016-09-13 15:05:02 +0200
commit0570fa38d50d21e7a96094e5499c435c9814736d (patch)
tree03ee45afd05c67c367a7518bd645de702399bfb3
parentad5f745a5ba255b14f83a1efc8e4708a05a3e2bd (diff)
downloadsql-parser-0570fa38d50d21e7a96094e5499c435c9814736d.zip
sql-parser-0570fa38d50d21e7a96094e5499c435c9814736d.tar.gz
sql-parser-0570fa38d50d21e7a96094e5499c435c9814736d.tar.bz2
Test handling of long options
Signed-off-by: Michal Čihař <michal@cihar.com>
-rw-r--r--tests/Utils/CLITest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Utils/CLITest.php b/tests/Utils/CLITest.php
index 3087f29..b89cc65 100644
--- a/tests/Utils/CLITest.php
+++ b/tests/Utils/CLITest.php
@@ -32,6 +32,11 @@ class CLITest extends TestCase
0,
),
array(
+ array('query' => 'SELECT 1'),
+ "\x1b[35mSELECT\n \x1b[92m1\x1b[0m\n",
+ 0,
+ ),
+ array(
array('q' => 'SELECT 1', 'f' => 'html'),
'<span class="sql-reserved">SELECT</span>' . "\n" .
' <span class="sql-number">1</span>' . "\n",
@@ -75,6 +80,11 @@ class CLITest extends TestCase
0,
),
array(
+ array('query' => 'SELECT 1'),
+ '',
+ 0,
+ ),
+ array(
array('q' => 'SELECT SELECT'),
'#1: An expression was expected. (near "SELECT" at position 7)' . "\n" .
'#2: This type of clause was previously parsed. (near "SELECT" at position 7)' . "\n" .