mirror of
https://github.com/glebarez/go-sqlite.git
synced 2025-10-05 07:46:50 +08:00
windows: fix TestPersistPragma.2, updates #67
This commit is contained in:
15
all_test.go
15
all_test.go
@@ -1546,11 +1546,18 @@ func TestIssue53(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
db, err := sql.Open(driverName, "testissue53.sqlite")
|
||||
const fn = "testissue53.sqlite"
|
||||
|
||||
db, err := sql.Open(driverName, fn)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
db.Close()
|
||||
os.Remove(fn)
|
||||
}()
|
||||
|
||||
if _, err := db.Exec(`
|
||||
CREATE TABLE IF NOT EXISTS loginst (
|
||||
instid INTEGER PRIMARY KEY,
|
||||
@@ -1593,9 +1600,9 @@ func TestPersistPragma(t *testing.T) {
|
||||
}
|
||||
|
||||
pragmas := []pragmaCfg{
|
||||
{"foreign_keys", "on", int64(1)},
|
||||
{"analysis_limit", "1000", int64(1000)},
|
||||
{"application_id", "214", int64(214)},
|
||||
{"foreign_keys", "on", int64(1)},
|
||||
{"analysis_limit", "1000", int64(1000)},
|
||||
{"application_id", "214", int64(214)},
|
||||
{"encoding", "'UTF-16le'", "UTF-16le"}}
|
||||
|
||||
if err := testPragmas("testpersistpragma.sqlite", "testpersistpragma.sqlite", pragmas); err != nil {
|
||||
|
Reference in New Issue
Block a user