提交 7bfcb317 authored 作者: Noel Grandin's avatar Noel Grandin

move some tests to trigger script file

上级 7db8f19e
...@@ -103,7 +103,7 @@ public class TestScript extends TestBase { ...@@ -103,7 +103,7 @@ public class TestScript extends TestBase {
testScript("datatypes/" + s + ".sql"); testScript("datatypes/" + s + ".sql");
} }
for (String s : new String[] { "alterTableAdd", "alterTableDropColumn", for (String s : new String[] { "alterTableAdd", "alterTableDropColumn",
"createAlias", "createView", "createTable", "createAlias", "createView", "createTable", "createTrigger",
"dropSchema" }) { "dropSchema" }) {
testScript("ddl/" + s + ".sql"); testScript("ddl/" + s + ".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
--
CREATE TABLE COUNT(X INT);
> ok
CREATE FORCE TRIGGER T_COUNT BEFORE INSERT ON COUNT CALL "com.Unknown";
> ok
INSERT INTO COUNT VALUES(NULL);
> exception
DROP TRIGGER T_COUNT;
> ok
CREATE TABLE ITEMS(ID INT CHECK ID < SELECT MAX(ID) FROM COUNT);
> ok
insert into items values(DEFAULT);
> update count: 1
DROP TABLE COUNT;
> exception
insert into items values(DEFAULT);
> update count: 1
drop table items, count;
> ok
...@@ -1391,33 +1391,6 @@ drop table test; ...@@ -1391,33 +1391,6 @@ drop table test;
select rtrim() from dual; select rtrim() from dual;
> exception > exception
CREATE TABLE COUNT(X INT);
> ok
CREATE FORCE TRIGGER T_COUNT BEFORE INSERT ON COUNT CALL "com.Unknown";
> ok
INSERT INTO COUNT VALUES(NULL);
> exception
DROP TRIGGER T_COUNT;
> ok
CREATE TABLE ITEMS(ID INT CHECK ID < SELECT MAX(ID) FROM COUNT);
> ok
insert into items values(DEFAULT);
> update count: 1
DROP TABLE COUNT;
> exception
insert into items values(DEFAULT);
> update count: 1
drop table items, count;
> ok
CREATE TABLE TEST(ID INT PRIMARY KEY, LABEL CHAR(20), LOOKUP CHAR(30)); CREATE TABLE TEST(ID INT PRIMARY KEY, LABEL CHAR(20), LOOKUP CHAR(30));
> ok > ok
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论