diff options
Diffstat (limited to 'lang/sql/sqlite/test/loadext.test')
| -rw-r--r-- | lang/sql/sqlite/test/loadext.test | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lang/sql/sqlite/test/loadext.test b/lang/sql/sqlite/test/loadext.test index db5745b4..0d5b8419 100644 --- a/lang/sql/sqlite/test/loadext.test +++ b/lang/sql/sqlite/test/loadext.test @@ -23,7 +23,7 @@ ifcapable !load_ext { # The name of the test extension varies by operating system. # -if {$::tcl_platform(platform) eq "windows" || $::tcl_platform(platform) eq "os2"} { +if {$::tcl_platform(platform) eq "windows"} { set testextension ./testloadext.dll } else { set testextension ./libtestloadext.so @@ -134,25 +134,27 @@ sqlite3_enable_load_extension db 1 # Try to load an extension for which the file does not exist. # do_test loadext-2.1 { - file delete -force ${testextension}xx + forcedelete ${testextension}xx set rc [catch { sqlite3_load_extension db "${testextension}xx" } msg] list $rc $msg -} [list 1 [format $dlerror_nosuchfile ${testextension}xx]] +} /[list 1 [format $dlerror_nosuchfile ${testextension}xx.*]]/ # Try to load an extension for which the file is not a shared object # do_test loadext-2.2 { - set fd [open "${testextension}xx" w] + set fd [open "./notasharedlib.so" w] + puts $fd blah + close $fd + set fd [open "./notasharedlib.dll" w] puts $fd blah close $fd set rc [catch { - sqlite3_load_extension db "${testextension}xx" + sqlite3_load_extension db "./notasharedlib" } msg] - set expected_error_pattern [format $dlerror_notadll ${testextension}xx] - list $rc [string match $expected_error_pattern $msg] -} [list 1 1] + list $rc $msg +} /[list 1 [format $dlerror_notadll ./notasharedlib.*]]/ # Try to load an extension for which the file is present but the # entry point is not. @@ -196,7 +198,7 @@ do_test loadext-3.2 { regsub {0x[1234567890abcdefABCDEF]*} $res XXX res } set res -} [list 1 [format $dlerror_nosymbol $testextension sqlite3_extension_init]] +} /[list 1 [format $dlerror_nosymbol $testextension sqlite3_.*_init]]/ do_test loadext-3.3 { catchsql { SELECT load_extension($::testextension,'testloadext_init') |
