limbo/testing/concat.test
2025-01-21 00:29:23 +05:30

25 lines
494 B
Tcl

#!/usr/bin/env tclsh
set testdir [file dirname $argv0]
source $testdir/tester.tcl
do_execsql_test concat {
SELECT 'Hello' || ' ' || 'World';
} {"Hello World"}
do_execsql_test concat-2 {
SELECT 'Hello' || NULL;
} {}
do_execsql_test concat-3 {
SELECT 'Hello' || NULL;
} {}
do_execsql_test concat-4 {
SELECT 'A good ' || name FROM products WHERE name = 'hat';
} {"A good hat"}
do_execsql_test concat-4 {
SELECT 'A good ' || name FROM products WHERE name = 'watch';
} {}