提交 ad96fd7c authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Extract comments tests from testScript.sql to comments.sql

上级 3f80639b
...@@ -86,6 +86,7 @@ public class TestScript extends TestBase { ...@@ -86,6 +86,7 @@ public class TestScript extends TestBase {
reconnectOften = !config.memory && config.big; reconnectOften = !config.memory && config.big;
testScript("testScript.sql"); testScript("testScript.sql");
testScript("comments.sql");
testScript("derived-column-names.sql"); testScript("derived-column-names.sql");
testScript("dual.sql"); testScript("dual.sql");
testScript("indexes.sql"); testScript("indexes.sql");
......
-- Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
CALL 1 /* comment */ ;;
> 1
> -
> 1
> rows: 1
CALL 1 /* comment */ ;
> 1
> -
> 1
> rows: 1
call /* remark * / * /* ** // end */ 1;
> 1
> -
> 1
> rows: 1
--- remarks/comments/syntax ----------------------------------------------------------------------------------------------
CREATE TABLE TEST(
ID INT PRIMARY KEY, -- this is the primary key, type {integer}
NAME VARCHAR(255) -- this is a string
);
> ok
INSERT INTO TEST VALUES(
1 /* ID */,
'Hello' // NAME
);
> update count: 1
SELECT * FROM TEST;
> ID NAME
> -- -----
> 1 Hello
> rows: 1
DROP_ TABLE_ TEST_T;
> exception SYNTAX_ERROR_2
DROP TABLE TEST /*;
> exception SYNTAX_ERROR_1
DROP TABLE TEST;
> ok
...@@ -3384,24 +3384,6 @@ call select 1.0/3.0*3.0, 100.0/2.0, -25.0/100.0, 0.0/3.0, 6.9/2.0, 0.72179425150 ...@@ -3384,24 +3384,6 @@ call select 1.0/3.0*3.0, 100.0/2.0, -25.0/100.0, 0.0/3.0, 6.9/2.0, 0.72179425150
> (0.999999999999999999999999990, 50, -0.25, 0, 3.45, 1.35822361752313607260107721120531135706133161972E-10) > (0.999999999999999999999999990, 50, -0.25, 0, 3.45, 1.35822361752313607260107721120531135706133161972E-10)
> rows: 1 > rows: 1
CALL 1 /* comment */ ;;
> 1
> -
> 1
> rows: 1
CALL 1 /* comment */ ;
> 1
> -
> 1
> rows: 1
call /* remark * / * /* ** // end */ 1;
> 1
> -
> 1
> rows: 1
call (select x from dual where x is null); call (select x from dual where x is null);
> SELECT X FROM SYSTEM_RANGE(1, 1) /* PUBLIC.RANGE_INDEX: X IS NULL */ /* scanCount: 1 */ WHERE X IS NULL > SELECT X FROM SYSTEM_RANGE(1, 1) /* PUBLIC.RANGE_INDEX: X IS NULL */ /* scanCount: 1 */ WHERE X IS NULL
> ------------------------------------------------------------------------------------------------------- > -------------------------------------------------------------------------------------------------------
...@@ -6384,34 +6366,6 @@ SELECT ID, MAX(NAME) FROM TEST GROUP BY ID HAVING MAX(NAME) LIKE 'World%'; ...@@ -6384,34 +6366,6 @@ SELECT ID, MAX(NAME) FROM TEST GROUP BY ID HAVING MAX(NAME) LIKE 'World%';
DROP TABLE TEST; DROP TABLE TEST;
> ok > ok
--- remarks/comments/syntax ----------------------------------------------------------------------------------------------
CREATE TABLE TEST(
ID INT PRIMARY KEY, -- this is the primary key, type {integer}
NAME VARCHAR(255) -- this is a string
);
> ok
INSERT INTO TEST VALUES(
1 /* ID */,
'Hello' // NAME
);
> update count: 1
SELECT * FROM TEST;
> ID NAME
> -- -----
> 1 Hello
> rows: 1
DROP_ TABLE_ TEST_T;
> exception SYNTAX_ERROR_2
DROP TABLE TEST /*;
> exception SYNTAX_ERROR_1
DROP TABLE TEST;
> ok
--- exists ---------------------------------------------------------------------------------------------- --- exists ----------------------------------------------------------------------------------------------
CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255)); CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255));
> ok > ok
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论