xref: /sqlite-3.40.0/test/vacuum2.test (revision 4dcbdbff)
1# 2005 February 15
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.  The
12# focus of this file is testing the VACUUM statement.
13#
14# $Id: vacuum2.test,v 1.1 2005/02/16 03:27:08 drh Exp $
15
16set testdir [file dirname $argv0]
17source $testdir/tester.tcl
18
19# If the VACUUM statement is disabled in the current build, skip all
20# the tests in this file.
21#
22ifcapable {!vacuum} {
23  finish_test
24  return
25}
26if $AUTOVACUUM {
27  finish_test
28  return
29}
30
31# Ticket #1121 - make sure vacuum works if all autoincrement tables
32# have been deleted.
33#
34do_test vacuum2-1.1 {
35  execsql {
36    CREATE TABLE t1(x INTEGER PRIMARY KEY AUTOINCREMENT, y);
37    DROP TABLE t1;
38    VACUUM;
39  }
40} {}
41
42finish_test
43