filectrl.test 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # 2008 Jan 22
  2. #
  3. # The author disclaims copyright to this source code. In place of
  4. # 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. #
  12. # $Id: filectrl.test,v 1.2 2008/11/21 00:10:35 aswift Exp $
  13. set testdir [file dirname $argv0]
  14. source $testdir/tester.tcl
  15. do_test filectrl-1.1 {
  16. file_control_test db
  17. } {}
  18. do_test filectrl-1.2 {
  19. db eval {CREATE TEMP TABLE x(y);}
  20. file_control_test db
  21. } {}
  22. do_test filectrl-1.3 {
  23. db close
  24. sqlite3 db :memory:
  25. file_control_test db
  26. } {}
  27. do_test filectrl-1.4 {
  28. sqlite3 db test.db
  29. file_control_lasterrno_test db
  30. } {}
  31. do_test filectrl-1.5 {
  32. db close
  33. sqlite3 db test_control_lockproxy.db
  34. file_control_lockproxy_test db [get_pwd]
  35. } {}
  36. do_test filectrl-1.6 {
  37. sqlite3 db test.db
  38. set fn [file_control_tempfilename db]
  39. puts -nonewline \[$fn\]
  40. set fn
  41. } {/etilqs_/}
  42. db close
  43. forcedelete .test_control_lockproxy.db-conch test.proxy
  44. finish_test