mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-07 02:04:21 +01:00
29 lines
525 B
Tcl
29 lines
525 B
Tcl
#!/usr/bin/env tclsh
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
|
|
do_execsql_test like-fn {
|
|
select name, like('sweat%', name) from products;
|
|
} {hat|0
|
|
cap|0
|
|
shirt|0
|
|
sweater|1
|
|
sweatshirt|1
|
|
shorts|0
|
|
jeans|0
|
|
sneakers|0
|
|
boots|0
|
|
coat|0
|
|
accessories|0}
|
|
|
|
do_execsql_test where-like {
|
|
select * from products where name like 'sweat%';
|
|
} {4|sweater|2.0
|
|
5|sweatshirt|67.0}
|
|
|
|
do_execsql_test where-not-like {
|
|
select * from products where name not like 'sneak%' and price >= 70.0;
|
|
} {3|shirt|79.0
|
|
7|jeans|80.0}
|