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 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing that destructor functions associated
13 # with functions created using sqlite3_create_function_v2() is
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
22 proc destroy {} { set ::destroyed 1 }
23 sqlite3_create_function_v2 db f2 -1 any -func f2 -destroy destroy
27 sqlite3_create_function_v2 db f2 -1 utf8 -func f2
31 sqlite3_create_function_v2 db f2 -1 utf16le -func f2
35 sqlite3_create_function_v2 db f2 -1 utf16be -func f2
41 proc destroy {} { set ::destroyed 1 }
42 sqlite3_create_function_v2 db f3 -1 utf8 -func f3 -destroy destroy
46 sqlite3_create_function_v2 db f3 -1 utf8 -func f3
52 proc destroy {} { set ::destroyed 1 }
53 sqlite3_create_function_v2 db f3 -1 any -func f3 -destroy destroy
65 sqlite3_create_function_v2 db f3 -1 any -func f3 -step f3 -destroy destroy
69 do_test func3-4.2 { set destroyed } 1