summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed invalid lexing of queries with : in strings.Michal Čihař2017-05-153-0/+6
| | | | | | | | We really can't use anyting as label, it has way stricter syntax. Fixes https://github.com/phpmyadmin/phpmyadmin/issues/13272 Signed-off-by: Michal Čihař <michal@cihar.com>
* Maximum length of a delimiter is 15 characters.Dan Ungureanu2017-05-083-0/+10
| | | | | | Fixes #12. Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
* Remove debug error messagesMichal Čihař2017-05-053-3/+3
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Properly handle lowercase begin statementMichal Čihař2017-05-053-0/+14
| | | | | | | | Actually all statements where main token is used as an option. Fixes https://github.com/phpmyadmin/phpmyadmin/issues/13240 Signed-off-by: Michal Čihař <michal@cihar.com>
* Fixes wrong extract of string tokens with escaped characters.Dan Ungureanu2017-04-117-18/+28
| | | | | | Fixes #40. Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
* Merge pull request #148 from nijel/inline-comment-newlineMichal Čihař2017-04-062-4/+7
|\ | | | | Fixed inline comments parsing
| * Fixed handling newlines in inline comentsMichal Čihař2017-04-042-4/+7
| | | | | | | | | | | | | | | | | | The newline is now included as separate token, previously it was silently discarded, so it was not present in output. See https://github.com/phpmyadmin/phpmyadmin/issues/13139 Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge pull request #146 from Achilles-96/Issue-11717Michal Čihař2017-04-061-1/+25
|\ \ | |/ |/| Fixes striping of inline comments #11717
| * Fixes striping of inline comments #11717Raghuram2017-04-051-1/+25
| | | | | | | | Signed-off-by: Raghuram Vadapalli <raghuram.vadapalli@research.iiit.ac.in>
* | Add utility to tokenize queryMichal Čihař2017-04-031-0/+53
|/ | | | | | | | It's mostly useful for debugging changes in parser. See #147. Signed-off-by: Michal Čihař <michal@cihar.com>
* Merge pull request #145 from devenbansod/fix_144Michal Čihař2017-03-304-0/+12
|\ | | | | Fix parsing of DELETE clauses with JOINs
| * Fix parsing of DELETE clauses with JOINsDeven Bansod2017-03-304-0/+12
| | | | | | | | | | | | | | | | | | Ref: https://dev.mysql.com/doc/refman/5.7/en/delete.html Fix #144 Fix phpmyadmin/phpmyadmin#13129 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Fix BEGIN/END indentationMichal Čihař2017-02-201-12/+12
| | | | | | | | | | | | Ensure we never have negative indentation Signed-off-by: Michal Čihař <michal@cihar.com>
* | Aplly coding style fixesMichal Čihař2017-02-202-6/+1
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Fix class prefix in test dataMichal Čihař2017-02-201-1/+1
| | | | | | | | | | | | The test was wrongly using old class names without PhpMyAdmin prefix. Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge pull request #143 from devenbansod/fix_131Michal Čihař2017-02-2027-0/+280
|\ \ | | | | | | Parse LOAD statement properly
| * | Parse LOAD statement properlyDeven Bansod2017-02-1827-0/+280
| |/ | | | | | | | | | | | | | | Fix #131 Might help to fix phpmyadmin/phpmyadmin#12345 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Merge pull request #141 from bigfoot90/inline-joinsMichal Čihař2017-02-201-0/+7
|\ \ | | | | | | Inline JOINs
| * | Inline JOINsDamian Dlugosz2017-02-161-0/+7
| |/
* | Fix broken clause order validationDeven Bansod2017-02-173-0/+3
|/ | | | | | Fix #113 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Merge remote-tracking branch 'origin/pull/137'Michal Čihař2017-02-1427-0/+87
|\
| * Apply cs fixesDamian Dlugosz2017-02-1227-0/+53
| |
* | Order importsDamian Dlugosz2017-02-1233-35/+35
|/
* Various coding style fixesMichal Čihař2017-02-071-3/+1
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Test getopt() invocation as wellMichal Čihař2017-02-071-0/+16
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Run php-cs-fixerMichal Čihař2017-02-061-85/+43
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Fix expected format for BEGIN/ENDMichal Čihař2017-02-061-6/+12
| | | | | | Issue #120 Signed-off-by: Michal Čihař <michal@cihar.com>
* Merge remote-tracking branch 'origin/pull/120' into tmpMichal Čihař2017-02-061-132/+296
|\
| * Remove old tests and fix method names 'formatQueries' and 'testFormat'Damian Dlugosz2017-02-051-148/+3
| |
| * Testing typicalDamian Dlugosz2017-02-011-1/+46
| |
| * Fix test create tableDamian Dlugosz2017-02-011-7/+7
| |
| * Testing minimal and simplyDamian Dlugosz2017-02-011-6/+30
| |
| * Testing create tableDamian Dlugosz2017-02-011-1/+35
| |
| * Testing escaping cli and escaping htmlDamian Dlugosz2017-02-011-4/+36
| |
| * Testing string as aliasDamian Dlugosz2017-02-011-3/+15
| |
| * Testing distinct countDamian Dlugosz2017-02-011-0/+12
| |
| * Testing InsertDamian Dlugosz2017-02-011-6/+12
| |
| * Testing create procedureDamian Dlugosz2017-02-011-6/+42
| |
| * Testing keywordsDamian Dlugosz2017-02-011-1/+13
| |
| * Testing strip commentsDamian Dlugosz2017-02-011-11/+41
| |
| * Rebased on top of masterDamian Dlugosz2017-02-011-25/+17
| |
| * Testing commentsDamian Dlugosz2017-02-011-9/+31
| |
| * select with commentDamian Dlugosz2017-02-011-0/+13
| |
| * Begin writing new format queries testsDamian Dlugosz2017-02-011-13/+52
| |
* | Store uppercase keyword value for later processingMichal Čihař2017-02-06179-537/+537
|/ | | | | | This makes easier to compare it later. Signed-off-by: Michal Čihař <michal@cihar.com>
* Merge branch 'master' into motranslatorMichal Čihař2017-01-23239-760/+760
|\
| * Added PhpMyAdmin namespace prefix to follow PSR-4.Michal Čihař2017-01-23239-760/+760
| | | | | | | | | | | | Fixes #126 Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-234-27/+29
|\ \ | |/
| * Merge pull request #123 from bigfoot90/fix-comment-parsingMichal Čihař2017-01-204-27/+29
| |\ | | | | | | Fix comment parsing
| | * Fix comment parsingDamian Dlugosz2017-01-102-13/+25
| | |
| | * Fix comment parsingDamian Dlugosz2017-01-083-15/+5
| | |
* | | Merge branch 'master' into motranslatorMichal Čihař2017-01-208-33/+50
|\ \ \ | |/ /
| * | Fixed parsing of unterminated variables.Michal Čihař2017-01-203-0/+6
| |/ | | | | | | | | | | Fixes https://github.com/phpmyadmin/phpmyadmin/issues/12894 Signed-off-by: Michal Čihař <michal@cihar.com>
| * Merge pull request #121 from bigfoot90/better-htmlMichal Čihař2017-01-072-31/+37
| |\ | | | | | | Fix indentation on html format
| | * Fix indentation on html formatDamian Dlugosz2017-01-062-31/+37
| | |
| * | autload-devDamian Dlugosz2017-01-061-2/+1
| |/
| * Properly handle operators AND, NOT, OR, XOR, DIV, MODMichal Čihař2017-01-063-0/+6
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-0660-311/+200
|\ \ | |/
| * Apply php-cs-fixerDamian Dlugosz2017-01-0660-311/+200
| |
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-032-3/+37
|\ \ | |/
| * Add some missing assertionsMichal Čihař2017-01-031-3/+31
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
| * Simplify rules mergingMichal Čihař2017-01-031-0/+6
| | | | | | | | | | | | | | We first sanitize the merged array and we can later use it without checking. Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-033-0/+6
|\ \ | |/
| * Properly report missing expression errorMichal Čihař2017-01-033-0/+6
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-031-0/+5
|\ \ | |/
| * Add test for text formatterMichal Čihař2017-01-031-0/+5
| | | | | | | | | | | | Issue #110 Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-033-0/+6
|\ \ | |/
| * Test error on double ASMichal Čihař2017-01-033-0/+6
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-033-0/+6
|\ \ | |/
| * Add missing test for error conditionMichal Čihař2017-01-033-0/+6
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-021-0/+214
|\ \ | |/
| * Handling merging formats arraysDamian Dlugosz2016-12-301-0/+214
| |
* | Merge branch 'master' into motranslatorMichal Čihař2016-12-228-0/+58
|\ \ | |/
| * Merge pull request #107 from devenbansod/fix_105Michal Čihař2016-12-228-0/+58
| |\ | | | | | | Fix #105: Fix parsing of FIELDS and LINES options in Select..Into
| | * Add more tests, fix unneeded errorDeven Bansod2016-12-213-0/+11
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| | * Add more testsDeven Bansod2016-12-214-0/+32
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| | * Add tests for parsing of FIELDS and LINES options in SELECT..INTODeven Bansod2016-12-213-0/+15
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | | Merge branch 'master' into motranslatorMichal Čihař2016-12-213-3/+3
|\ \ \ | |/ /
| * | Consistently end message with .Michal Čihař2016-12-213-3/+3
| |/ | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Replace __( usage by Translator classMichal Čihař2016-12-213-6/+8
|/ | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Document why unserialize() is needed for testsMichal Čihař2016-12-081-0/+5
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Recognize BINARY as functionMichal Čihař2016-11-303-0/+6
| | | | | | Fixes https://github.com/phpmyadmin/phpmyadmin/issues/12762 Signed-off-by: Michal Čihař <michal@cihar.com>
* Add tests for prevention of incorrect errors in UNION queriesDeven Bansod2016-11-203-0/+3
| | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com> Conflicts: tests/Parser/SelectStatementTest.php
* Add a forgotten testDeven Bansod2016-11-201-0/+1
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add tests for prevention of wrong order in JOINsDeven Bansod2016-11-153-0/+11
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add builders test for end options in SELECTDeven Bansod2016-11-121-0/+23
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add parser tests for end options in SELECTDeven Bansod2016-11-127-0/+21
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add forgotten testcaseMichal Čihař2016-11-092-0/+11
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Fix test for pr #97 and #98Michal Čihař2016-11-091-1/+1
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Fix test for terminology changeMarc Delisle2016-11-091-1/+1
|
* Add tests for #22Deven Bansod2016-11-033-0/+3
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Merge branch 'master' of https://github.com/phpmyadmin/sql-parserDeven Bansod2016-10-2521-2/+144
|\
| * Merge pull request #94 from devenbansod/fix_57Michal Čihař2016-10-255-0/+86
| |\ | | | | | | Enable Lexing of begin_label in the in-procedure statements
| | * Enable Lexing of begin_label in the in-procedure statementsDeven Bansod2016-10-215-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ex. BEGIN.. END, LOOP, REPEAT, WHILE statements Fix #57 Fix phpmyadmin/phpmyadmin#12344 Fix phpmyadmin/phpmyadmin#12228 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * | Merge pull request #95 from devenbansod/fix_93Michal Čihař2016-10-2516-2/+58
| |\ \ | | | | | | | | Fix #93 : Fix parsing of NATURAL JOIN, CROSS JOIN and related joins
| | * | Add call to test in test fileDeven Bansod2016-10-241-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| | * | Add parsing of multiple JOINS in single queryDeven Bansod2016-10-242-0/+6
| | | | | | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| | * | Add tests for various NATURAL JOINS, fix testDeven Bansod2016-10-2410-2/+25
| | | | | | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| | * | Fix parsing of NATURAL JOIN, CROSS JOIN and related joinsDeven Bansod2016-10-245-0/+26
| | |/ | | | | | | | | | | | | | | | | | | | | | Fix #93 Add tests to cover parsing of these joins Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | | Add tests for removal of option which has value attached to itDeven Bansod2016-10-251-0/+15
|/ / | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>