Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5bf52f91
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5bf52f91
编写于
9月 27, 2021
作者:
J
jiacy-jcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-6145]<test>:update testcase
上级
c976aeb2
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
46 addition
and
8 deletion
+46
-8
tests/pytest/query/queryRegex.py
tests/pytest/query/queryRegex.py
+46
-8
未找到文件。
tests/pytest/query/queryRegex.py
浏览文件 @
5bf52f91
...
...
@@ -29,37 +29,75 @@ class TDTestCase:
print
(
"==============step1"
)
##2021-09-17 For jira: https://jira.taosdata.com:18080/browse/TD-6585
tdSql
.
execute
(
"create stable if not exists stb_test(ts timestamp,c0 binary(32)) tags(t0 binary(32))"
"create stable if not exists stb_test(ts timestamp,c0 binary(32)
,c1 int
) tags(t0 binary(32))"
)
tdSql
.
execute
(
'create table if not exists stb_1 using stb_test tags("abcdefgasdfg12346")'
)
tdLog
.
info
(
'insert into stb_1 values("2021-09-13 10:00:00.001","abcefdasdqwerxasdazx12345"'
)
tdSql
.
execute
(
'insert into stb_1 values("2021-09-13 10:00:00.001","abcefdasdqwerxasdazx12345")'
)
tdLog
.
info
(
'insert into stb_1 values("2021-09-13 10:00:00.001","abcefdasdqwerxasdazx12345",15'
)
tdSql
.
execute
(
'insert into stb_1 values("2021-09-13 10:00:00.002","abcefdasdqwerxasdazx12345",15)'
)
tdSql
.
execute
(
'insert into stb_1 values("2021-09-13 10:00:00.003","aaaaafffwwqqxzz",16)'
)
tdSql
.
execute
(
'insert into stb_1 values("2021-09-13 10:00:00.004","fffwwqqxzz",17)'
)
tdSql
.
execute
(
'insert into stb_1 values("2020-10-13 10:00:00.001","abcd
\\
\efgh",100)'
)
tdSql
.
query
(
'select * from stb_test where tbname match "asd"'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
'select * from stb_test where tbname nmatch "asd"'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
'select * from stb_test where c0 match "abc"'
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
'select * from stb_test where c0 nmatch "abc"'
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
'select * from stb_test where c0 match "^a"'
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
'select * from stb_test where c0 nmatch "^a"'
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
'select * from stb_test where c0 match "5$"'
)
tdSql
.
checkData
(
0
,
1
,
"abcefdasdqwerxasdazx12345"
)
tdSql
.
query
(
'select * from stb_test where c0 nmatch "5$"'
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
'select * from stb_test where c0 nmatch "abc"'
)
tdSql
.
query
(
'select * from stb_test where c0 match "a*"'
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
'select * from stb_test where c0 nmatch "a*"'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
'select * from stb_test where c0 match "a+"'
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
'select * from stb_test where c0 nmatch "a+"'
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
'select * from stb_test where c0 match "a?"'
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
'select * from stb_test where c0 nmatch "a?"'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
'select last(c1) from stb_test where c0 match "a"'
)
tdSql
.
checkData
(
0
,
0
,
16
)
tdSql
.
query
(
'select count(c1) from stb_test where t0 match "a"'
)
tdSql
.
checkData
(
0
,
0
,
4
)
tdSql
.
error
(
'select * from stb_test where c0 match abc'
)
tdSql
.
error
(
'select * from stb_test where c0 nmatch abc'
)
tdSql
.
execute
(
'insert into stb_1 values("2020-10-13 10:00:00.001","abcd
\\
\efgh")'
)
tdSql
.
query
(
"select * from stb_1 where c0 match '
\\\\
'"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select * from stb_1 where c0 nmatch '
\\\\
'"
)
tdSql
.
checkRows
(
3
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录