⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 async3.test

📁 最新的sqlite3.6.2源代码
💻 TEST
字号:
# 2007 September 5## The author disclaims copyright to this source code.  In place of# a legal notice, here is a blessing:##    May you do good and not evil.#    May you find forgiveness for yourself and forgive others.#    May you share freely, never taking more than you give.##***********************************************************************## The focus of this file is testing the code in test_async.c.# Specifically, it tests that the xFullPathname() method of# of the asynchronous vfs works correctly.## $Id: async3.test,v 1.3 2007/11/05 17:01:08 danielk1977 Exp $set testdir [file dirname $argv0]source $testdir/tester.tclif { [info commands sqlite3async_enable]==""  } {  # The async logic is not built into this system  puts "Skipping async3 tests: not compiled with required features"  finish_test  return}db closesqlite3async_enable 1sqlite3async_startset paths {  chocolate/banana/vanilla/file.db  chocolate//banana/vanilla/file.db  chocolate/./banana//vanilla/file.db  chocolate/banana/./vanilla/file.db  chocolate/banana/../banana/vanilla/file.db  chocolate/banana/./vanilla/extra_bit/../file.db}do_test async3-1.0 {  file mkdir [file join chocolate banana vanilla]  file delete -force chocolate/banana/vanilla/file.db  file delete -force chocolate/banana/vanilla/file.db-journal} {}do_test async3-1.1 {  sqlite3 db chocolate/banana/vanilla/file.db  execsql {    CREATE TABLE abc(a, b, c);    BEGIN;    INSERT INTO abc VALUES(1, 2, 3);  }} {}set N 2foreach p $paths {  sqlite3 db2 $p  do_test async3-1.$N.1 {    execsql {SELECT * FROM abc} db2  } {}  do_test async3-1.$N.2 {    catchsql {INSERT INTO abc VALUES(4, 5, 6)} db2  } {1 {database is locked}}  db2 close  incr N}db closesqlite3async_halt idlesqlite3async_waitsqlite3async_halt neversqlite3async_enable 0finish_test

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -