Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
cdaf7187
提交
cdaf7187
authored
7 年前
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move tests for REGEXP_LIKE and REGEXP_REPLACE to own scripts
上级
b5341bb5
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
29 行增加
和
29 行删除
+29
-29
regex-replace.sql
...st/org/h2/test/scripts/functions/string/regex-replace.sql
+15
-0
regexp-like.sql
...test/org/h2/test/scripts/functions/string/regexp-like.sql
+14
-0
testScript.sql
h2/src/test/org/h2/test/scripts/testScript.sql
+0
-29
没有找到文件。
h2/src/test/org/h2/test/scripts/functions/string/regex-replace.sql
浏览文件 @
cdaf7187
...
...
@@ -2,3 +2,18 @@
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
call
regexp_replace
(
'x'
,
'x'
,
'
\'
);
> exception
CALL REGEXP_REPLACE('
abckaboooom
', '
o
+
', '
o
');
> '
abckabom
'
> ----------
> abckabom
> rows: 1
select regexp_replace('
Sylvain
', '
S
..
', '
TOTO
', '
mni
') as X;
> X
> --------
> TOTOvain
> rows: 1
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/scripts/functions/string/regexp-like.sql
浏览文件 @
cdaf7187
...
...
@@ -2,3 +2,17 @@
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
call
select
1
from
dual
where
regexp_like
(
'x'
,
'x'
,
'
\'
);
> exception
select x from dual where REGEXP_LIKE('
A
', '
[
a
-
z
]
', '
i
');
> X
> -
> 1
> rows: 1
select x from dual where REGEXP_LIKE('
A
', '
[
a
-
z
]
', '
c
');
> X
> -
> rows: 0
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/scripts/testScript.sql
浏览文件 @
cdaf7187
...
...
@@ -164,12 +164,6 @@ select 1 from test group by x;
drop
table
test
;
>
ok
call
regexp_replace
(
'x'
,
'x'
,
'
\'
);
> exception
call select 1 from dual where regexp_like('
x
', '
x
', '
\
');
> exception
select
*
from
dual
where
x
=
x
+
1
or
x
in
(
2
,
0
);
>
X
>
-
...
...
@@ -2109,29 +2103,6 @@ drop table test;
set autocommit true;
> ok
CALL REGEXP_REPLACE('
abckaboooom
', '
o
+
', '
o
');
> '
abckabom
'
> ----------
> abckabom
> rows: 1
select x from dual where REGEXP_LIKE('
A
', '
[
a
-
z
]
', '
i
');
> X
> -
> 1
> rows: 1
select x from dual where REGEXP_LIKE('
A
', '
[
a
-
z
]
', '
c
');
> X
> -
> rows: 0
select regexp_replace('
Sylvain
', '
S
..
', '
TOTO
', '
mni
') as X;
> X
> --------
> TOTOvain
> rows: 1
SELECT '
Hello
' ~ '
He
.
*
' T1, '
HELLO
' ~ '
He
.
*
' F2, CAST('
HELLO
' AS VARCHAR_IGNORECASE) ~ '
He
.
*
' T3;
> T1 F2 T3
> ---- ----- ----
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论