CoolFace
Modelpublic

AryaWu/sqlite

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
exprfault.test46 linesDownload Raw Back to test
1# 2021 April 172#3# The author disclaims copyright to this source code.  In place of4# a legal notice, here is a blessing:5#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.9#10#***********************************************************************11# This file implements regression tests for SQLite library.12#13 14set testdir [file dirname $argv0]15source $testdir/tester.tcl16set testprefix exprfault17 18do_execsql_test 1.0 {19  CREATE TABLE t1(a);                 20  CREATE TABLE t2(d);                 21}22faultsim_save_and_close23 24do_faultsim_test 1.1 -faults oom* -prep {25  faultsim_restore_and_reopen26} -body {27  execsql {28    SELECT a = ( SELECT d FROM (SELECT d FROM t2) ) FROM t1 29  }30} -test {31  faultsim_test_result {0 {}}32}33 34do_faultsim_test 2 -faults oom* -prep {35  faultsim_restore_and_reopen36} -body {37  execsql {38    SELECT hex ( unhex('ABCDEF') );39  }40} -test {41  faultsim_test_result {0 ABCDEF}42}43 44 45finish_test46