summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Roberts <git@chobert.org>2026-05-01 15:23:27 +0200
committerEli Zaretskii <eliz@gnu.org>2026-05-02 14:20:42 +0300
commitb376c405aa8d0bec62e38b0dd526b6db31c2e350 (patch)
treea72e41603242b99bf598e94f3ebe184ff1462311 /test
parentd51a4722316efe0960994d371e1859099894d1ca (diff)
; Add a test for sqlite-close
* test/src/sqlite-tests.el (sqlite-closed-db): Add test. (Bug#80908) Copyright-paperwork-exempt: yes
Diffstat (limited to 'test')
-rw-r--r--test/src/sqlite-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/sqlite-tests.el b/test/src/sqlite-tests.el
index a9fab7da681..bcd80124dfd 100644
--- a/test/src/sqlite-tests.el
+++ b/test/src/sqlite-tests.el
@@ -185,6 +185,14 @@
(sqlite-close db)
(should-error (sqlite-select db "select * from test6"))))
+(ert-deftest sqlite-closed-db ()
+ "Verify that `sqlite-close' on a closed database is a no-op."
+ (skip-unless (sqlite-available-p))
+ (let (db)
+ (setq db (sqlite-open))
+ (should (eq (sqlite-close db)
+ (sqlite-close db)))))
+
(ert-deftest sqlite-load-extension ()
(skip-unless (sqlite-available-p))
(skip-unless (fboundp 'sqlite-load-extension))