Add the json_pretty(J) function for pretty-printing of JSON. An optional
[sqlite.git] / test / func9.test
blob6cf9fc31ecdc7afffd3d1fd95e9e87851f3bc7cf
1 # 2023-08-29
3 # The author disclaims copyright to this source code.  In place of
4 # a legal notice, here is a blessing:
6 #    May you do good and not evil.
7 #    May you find forgiveness for yourself and forgive others.
8 #    May you share freely, never taking more than you give.
10 #*************************************************************************
12 # Test cases for SQL newer functions
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
17 do_execsql_test func9-100 {
18   SELECT concat('abc',123,null,'xyz');
19 } {abc123xyz}
20 do_execsql_test func9-110 {
21   SELECT typeof(concat(null));
22 } {text}
23 do_catchsql_test func9-120 {
24   SELECT concat();
25 } {1 {wrong number of arguments to function concat()}}
26 do_execsql_test func9-130 {
27   SELECT concat_ws(',',1,2,3,4,5,6,7,8,NULL,9,10,11,12);
28 } {1,2,3,4,5,6,7,8,9,10,11,12}
29 do_execsql_test func9-140 {
30   SELECT concat_ws(NULL,1,2,3,4,5,6,7,8,NULL,9,10,11,12);
31 } {{}}
32 do_catchsql_test func9-150 {
33   SELECT concat_ws();
34 } {1 {wrong number of arguments to function concat_ws()}}
35 do_catchsql_test func9-160 {
36   SELECT concat_ws(',');
37 } {1 {wrong number of arguments to function concat_ws()}}
40 finish_test