summaryrefslogtreecommitdiff
path: root/test/dump.sql
blob: 6bb4a23745520748574613ece08e1b7b7abe256e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!sqlite3
#
# 2026-10-20
#
# 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.
#
#***********************************************************************
#
# Test cases for the .dump CLI command
#
.open :memory:
.mode -reset test

.if NOT capable('fkey') OR NOT capable('vtab')
.testcase setup
.check ''
.exit
.endif

.open :memory:
.testcase 100
CREATE TABLE customer(RowID TEXT, name TEXT);
INSERT INTO customer VALUES('C-1001','Ann');
.dump --preserve-rowids
.check <<END
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE customer(RowID TEXT, name TEXT);
INSERT INTO customer(_rowid_,RowID,name) VALUES(1,'C-1001','Ann');
COMMIT;
END