提交 76c4fd22 authored 作者: migaman's avatar migaman

Move length test #1196

上级 ed405433
......@@ -127,7 +127,6 @@ public class TestFunctions extends TestDb implements AggregateFunction {
testAnnotationProcessorsOutput();
testRound();
testSignal();
testLength();
deleteDb("functions");
}
......@@ -2081,24 +2080,6 @@ public class TestFunctions extends TestDb implements AggregateFunction {
conn.close();
}
private void testLength() throws SQLException {
deleteDb("functions");
Connection conn = getConnection("functions");
Statement stat = conn.createStatement();
final ResultSet rs = stat.executeQuery(
"select LENGTH('This has 17 chars'), LEN('MSSQLServer uses the len keyword') from dual");
rs.next();
assertEquals(17, rs.getInt(1));
assertEquals(32, rs.getInt(2));
rs.close();
conn.close();
}
private void testThatCurrentTimestampIsSane() throws SQLException,
ParseException {
deleteDb("functions");
......
......@@ -2,3 +2,15 @@
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
insert into test values(1, 'Hello');
> update count: 1
select length(null) en, len(null) en2, length('This has 17 chars') e_17, len('MSSQLServer uses the len keyword') e_32 from test;
> EN EN2 E_17 E_32
> ---- ---- ---- ----
> null null 17 32
> rows: 1
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论