tkt1512.test 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # 2005 September 19
  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. # This file implements regression tests for SQLite library.
  12. #
  13. # This file implements tests to verify that ticket #1512 is
  14. # fixed.
  15. #
  16. set testdir [file dirname $argv0]
  17. source $testdir/tester.tcl
  18. ifcapable {!vacuum || !autovacuum} {
  19. finish_test
  20. return
  21. }
  22. if {[db one {PRAGMA auto_vacuum}]} {
  23. finish_test
  24. return
  25. }
  26. do_test tkt1512-1.1 {
  27. execsql {
  28. CREATE TABLE t1(a,b);
  29. INSERT INTO t1 VALUES(1,2);
  30. INSERT INTO t1 VALUES(3,4);
  31. SELECT * FROM t1
  32. }
  33. } {1 2 3 4}
  34. do_test tkt1512-1.2 {
  35. file size test.db
  36. } {2048}
  37. do_test tkt1512-1.3 {
  38. execsql {
  39. DROP TABLE t1;
  40. }
  41. file size test.db
  42. } {2048}
  43. do_test tkt1512-1.4 {
  44. execsql {
  45. VACUUM;
  46. }
  47. file size test.db
  48. } {1024}
  49. finish_test