summaryrefslogtreecommitdiffstats
path: root/tests/Utils
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2017-02-20 13:38:56 +0100
committerMichal Čihař <michal@cihar.com>2017-02-20 13:38:56 +0100
commit5c6e8f0e98e33f81e00d6881a4669f84167ad5be (patch)
tree5e7a73abcdf814110baa6fff7c2759c1ae85dcf1 /tests/Utils
parentd002e8b84122f7a0ab6d12da6f976a597e3a8500 (diff)
downloadsql-parser-5c6e8f0e98e33f81e00d6881a4669f84167ad5be.zip
sql-parser-5c6e8f0e98e33f81e00d6881a4669f84167ad5be.tar.gz
sql-parser-5c6e8f0e98e33f81e00d6881a4669f84167ad5be.tar.bz2
Fix BEGIN/END indentation
Ensure we never have negative indentation Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'tests/Utils')
-rw-r--r--tests/Utils/FormatterTest.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/Utils/FormatterTest.php b/tests/Utils/FormatterTest.php
index c209d27..12e9912 100644
--- a/tests/Utils/FormatterTest.php
+++ b/tests/Utils/FormatterTest.php
@@ -406,26 +406,26 @@ class FormatTest extends TestCase
'text' => 'CREATE' . "\n" .
'PROCEDURE test_procedure()' . "\n" .
'BEGIN' . "\n" .
- 'FROM' . "\n" .
- ' tbl' . "\n" .
- 'SELECT' . "\n" .
- ' *;' . "\n" .
+ ' FROM' . "\n" .
+ ' tbl' . "\n" .
+ ' SELECT' . "\n" .
+ ' *;' . "\n" .
'END',
'cli' => "\x1b[35mCREATE" . "\n" .
"\x1b[35mPROCEDURE \x1b[39mtest_procedure\x1b[39m(\x1b[39m)\n" .
"\x1b[95mBEGIN" . "\n" .
- "\x1b[35mFROM" . "\n" .
- " \x1b[39mtbl" . "\n" .
- "\x1b[35mSELECT" . "\n" .
- " \x1b[39m*\x1b[39m;\n" .
+ " \x1b[35mFROM" . "\n" .
+ " \x1b[39mtbl" . "\n" .
+ " \x1b[35mSELECT" . "\n" .
+ " \x1b[39m*\x1b[39m;\n" .
"\x1b[95mEND" . "\x1b[0m",
'html' => '<span class="sql-reserved">CREATE</span>' . '<br/>' .
'<span class="sql-reserved">PROCEDURE</span> test_procedure()' . '<br/>' .
'<span class="sql-keyword">BEGIN</span>' . '<br/>' .
- '<span class="sql-reserved">FROM</span>' . '<br/>' .
- '&nbsp;&nbsp;&nbsp;&nbsp;tbl' . '<br/>' .
- '<span class="sql-reserved">SELECT</span>' . '<br/>' .
- '&nbsp;&nbsp;&nbsp;&nbsp;*;' . '<br/>' .
+ '&nbsp;&nbsp;&nbsp;&nbsp;<span class="sql-reserved">FROM</span>' . '<br/>' .
+ '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tbl' . '<br/>' .
+ '&nbsp;&nbsp;&nbsp;&nbsp;<span class="sql-reserved">SELECT</span>' . '<br/>' .
+ '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*;' . '<br/>' .
'<span class="sql-keyword">END</span>',
),
'insert' => array(