[TD-5922]<test>: add unitest cases
This commit is contained in:
parent
e554181cfb
commit
fbf76a3705
|
@ -53,6 +53,9 @@ class TDTestCase:
|
||||||
"select * from cars where id=0 and tbname in ('carzero', 'cartwo')")
|
"select * from cars where id=0 and tbname in ('carzero', 'cartwo')")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
|
tdSql.query("select * from cars where tbname in ('carZero', 'CARONE')")
|
||||||
|
tdSql.checkRows(2)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
tdSql.query("select * from cars where tbname like 'car%'")
|
tdSql.query("select * from cars where tbname like 'car%'")
|
||||||
tdSql.checkRows(2)
|
tdSql.checkRows(2)
|
||||||
|
|
|
@ -101,6 +101,30 @@ if $data11 != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
## tbname in can accpet Upper case table name
|
||||||
|
sql select count(*) from $stb where tbname in ('ti_tb0', 'TI_tb1', 'TI_TB2') group by t1 order by t1
|
||||||
|
if $rows != 3 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
if $data00 != 10 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
if $data01 != 0 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
if $data10 != 10 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
if $data11 != 1 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
if $data20 != 10 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
if $data21 != 2 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
# multiple tbname in is not allowed NOW
|
# multiple tbname in is not allowed NOW
|
||||||
sql_error select count(*) from $stb where tbname in ('ti_tb1', 'ti_tb300') and tbname in ('ti_tb5', 'ti_tb1000') group by t1 order by t1 asc
|
sql_error select count(*) from $stb where tbname in ('ti_tb1', 'ti_tb300') and tbname in ('ti_tb5', 'ti_tb1000') group by t1 order by t1 asc
|
||||||
#if $rows != 4 then
|
#if $rows != 4 then
|
||||||
|
|
Loading…
Reference in New Issue