diff options
author | Raghuram <raghuram.vadapalli@research.iiit.ac.in> | 2017-04-05 22:00:53 +0530 |
---|---|---|
committer | Raghuram <raghuram.vadapalli@research.iiit.ac.in> | 2017-04-05 22:02:55 +0530 |
commit | e52cabfaa0bd7d51fa3545c45f8d7fd804d379ba (patch) | |
tree | 8acd43fa8b0079cc753e4c7effbccb6370d5e7db /tests/Utils/BufferedQueryTest.php | |
parent | 6305be565414a4471133c251791edc4b31e97a4f (diff) | |
download | sql-parser-e52cabfaa0bd7d51fa3545c45f8d7fd804d379ba.zip sql-parser-e52cabfaa0bd7d51fa3545c45f8d7fd804d379ba.tar.gz sql-parser-e52cabfaa0bd7d51fa3545c45f8d7fd804d379ba.tar.bz2 |
Fixes striping of inline comments #11717
Signed-off-by: Raghuram Vadapalli <raghuram.vadapalli@research.iiit.ac.in>
Diffstat (limited to 'tests/Utils/BufferedQueryTest.php')
-rw-r--r-- | tests/Utils/BufferedQueryTest.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/Utils/BufferedQueryTest.php b/tests/Utils/BufferedQueryTest.php index 9ef539d..182c1ab 100644 --- a/tests/Utils/BufferedQueryTest.php +++ b/tests/Utils/BufferedQueryTest.php @@ -185,6 +185,7 @@ class BufferedQueryTest extends TestCase 'SET time_zone = "+00:00"', + '# Bash-like comment sytanx.' . "\n" . 'CREATE DEFINER=`root`@`localhost` PROCEDURE `film_in_stock` (IN `p_film_id` INT, IN `p_store_id` INT, OUT `p_film_count` INT) READS SQL DATA' . "\n" . 'BEGIN' . "\n" . ' SELECT inventory_id' . "\n" . @@ -196,6 +197,13 @@ class BufferedQueryTest extends TestCase ' SELECT FOUND_ROWS() INTO p_film_count;' . "\n" . 'END', + '-- --------------------------------------------------------' . "\n" . + '' . "\n" . + '--' . "\n" . + '-- Table structure for `actor`' . "\n" . + '--' . "\n" . + '' . "\n" . + '/* C-like comment syntax. */' . "\n" . 'CREATE TABLE IF NOT EXISTS `actor` (' . "\n" . '`actor_id` SMALLINT(5) UNSIGNED NOT NULL,' . "\n" . '`first_name` VARCHAR(45) NOT NULL,' . "\n" . @@ -231,8 +239,9 @@ class BufferedQueryTest extends TestCase 'SET time_zone = "+00:00"', - 'DELIMITER $$', + '/* a comment */ DELIMITER $$', + '# Bash-like comment sytanx.' . "\n" . 'CREATE DEFINER=`root`@`localhost` PROCEDURE `film_in_stock` (IN `p_film_id` INT, IN `p_store_id` INT, OUT `p_film_count` INT) READS SQL DATA' . "\n" . 'BEGIN' . "\n" . ' SELECT inventory_id' . "\n" . @@ -246,6 +255,13 @@ class BufferedQueryTest extends TestCase 'DELIMITER ;', + '-- --------------------------------------------------------' . "\n" . + '' . "\n" . + '--' . "\n" . + '-- Table structure for `actor`' . "\n" . + '--' . "\n" . + '' . "\n" . + '/* C-like comment syntax. */' . "\n" . 'CREATE TABLE IF NOT EXISTS `actor` (' . "\n" . '`actor_id` SMALLINT(5) UNSIGNED NOT NULL,' . "\n" . '`first_name` VARCHAR(45) NOT NULL,' . "\n" . @@ -281,6 +297,7 @@ class BufferedQueryTest extends TestCase 'SET time_zone = "+00:00";', + '# Bash-like comment sytanx.' . "\n" . 'CREATE DEFINER=`root`@`localhost` PROCEDURE `film_in_stock` (IN `p_film_id` INT, IN `p_store_id` INT, OUT `p_film_count` INT) READS SQL DATA' . "\n" . 'BEGIN' . "\n" . ' SELECT inventory_id' . "\n" . @@ -292,6 +309,13 @@ class BufferedQueryTest extends TestCase ' SELECT FOUND_ROWS() INTO p_film_count;' . "\n" . 'END$$', + '-- --------------------------------------------------------' . "\n" . + '' . "\n" . + '--' . "\n" . + '-- Table structure for `actor`' . "\n" . + '--' . "\n" . + '' . "\n" . + '/* C-like comment syntax. */' . "\n" . 'CREATE TABLE IF NOT EXISTS `actor` (' . "\n" . '`actor_id` SMALLINT(5) UNSIGNED NOT NULL,' . "\n" . '`first_name` VARCHAR(45) NOT NULL,' . "\n" . |