aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3_test.go')
-rw-r--r--sqlite3_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/sqlite3_test.go b/sqlite3_test.go
index cf826dd..fc5c99c 100644
--- a/sqlite3_test.go
+++ b/sqlite3_test.go
@@ -1315,6 +1315,22 @@ func TestDeclTypes(t *testing.T) {
}
}
+func TestPinger(t *testing.T) {
+ db, err := sql.Open("sqlite3", ":memory:")
+ if err != nil {
+ t.Fatal(err)
+ }
+ err = db.Ping()
+ if err != nil {
+ t.Fatal(err)
+ }
+ db.Close()
+ err = db.Ping()
+ if err == nil {
+ t.Fatal("Should be closed")
+ }
+}
+
var customFunctionOnce sync.Once
func BenchmarkCustomFunctions(b *testing.B) {