[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql c68f11b74e 313/427: Register emacsql-pg for unit t
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql c68f11b74e 313/427: Register emacsql-pg for unit testing. |
Date: |
Tue, 13 Dec 2022 02:59:54 -0500 (EST) |
branch: elpa/emacsql
commit c68f11b74e667aec62ac07d20c83f62f289a4726
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Register emacsql-pg for unit testing.
---
README.md | 5 +++--
tests/emacsql-external-tests.el | 18 +++++++++++-------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index a5af45373c..5da1c6a107 100644
--- a/README.md
+++ b/README.md
@@ -352,8 +352,9 @@ and unit testing.
make test
If the environment variable `PGDATABASE` is present then the unit
-tests will also be run with PostgreSQL. Also provide `PGHOST`,
-`PGPORT`, and `PGUSER` if needed.
+tests will also be run with PostgreSQL (emacsql-psql). Provide
+`PGHOST`, `PGPORT`, and `PGUSER` if needed. If `PGUSER` is provided,
+the pg.el backend (emacsql-pg) will also be tested.
If the environment variable `MYSQL_DBNAME` is present then the unit
tests will also be run with MySQL in the named database. Note that
diff --git a/tests/emacsql-external-tests.el b/tests/emacsql-external-tests.el
index dbb673d073..99150dc0d7 100644
--- a/tests/emacsql-external-tests.el
+++ b/tests/emacsql-external-tests.el
@@ -6,6 +6,7 @@
(require 'emacsql-sqlite)
(require 'emacsql-psql)
(require 'emacsql-mysql)
+(require 'emacsql-pg)
(defvar emacsql-tests-timeout 4
"Be aggressive about not waiting on subprocesses in unit tests.")
@@ -13,14 +14,17 @@
(defvar emacsql-tests-connection-factories
(let ((factories ())
(pgdatabase (getenv "PGDATABASE"))
+ (pguser (getenv "PGUSER"))
(mysql-dbname (getenv "MYSQL_DBNAME")))
- (push (cons "sqlite" (apply-partially #'emacsql-sqlite nil)) factories)
- (when pgdatabase
- (push (cons "psql" (apply-partially #'emacsql-psql pgdatabase))
- factories))
- (when mysql-dbname
- (push (cons "mysql" (apply-partially #'emacsql-mysql mysql-dbname))
- factories))
+ (cl-labels ((reg (name &rest args)
+ (push (cons name (apply #'apply-partially args)) factories)))
+ (reg "sqlite" #'emacsql-sqlite nil)
+ (when pgdatabase
+ (reg "psql" #'emacsql-psql pgdatabase))
+ (when (and pgdatabase pguser)
+ (reg "pg" #'emacsql-pg pgdatabase pguser))
+ (when mysql-dbname
+ (reg "mysql" #'emacsql-mysql mysql-dbname)))
(nreverse factories))
"List of connection factories to use in unit tests.")
- [nongnu] elpa/emacsql 38bd19ed6f 276/427: Oops, use the right equality., (continued)
- [nongnu] elpa/emacsql 38bd19ed6f 276/427: Oops, use the right equality., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 50e47ee01a 278/427: Remove shell quote., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6c7576e497 295/427: Rename condition emacsql-lock to emacsql-locked., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 39ce3b9736 287/427: Smarter identifier identification in expressions., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 20391923d1 292/427: Add option to disable local builds., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b375cd7759 294/427: Bump version number due to protocol change., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b60d9e05e2 277/427: Flesh out some docstrings., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ce05c8b2e2 305/427: Fix MySQL quoting., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3e16afce8b 281/427: Escape backslashes as well., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3c57f9a986 308/427: Adjust MySQL isolation level., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c68f11b74e 313/427: Register emacsql-pg for unit testing.,
ELPA Syncer <=
- [nongnu] elpa/emacsql ef4bcec524 321/427: Conform to elisp header conventions, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c1ea25c872 322/427: Drop Windows issue from README (fixed in 24.4)., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2bc599d856 327/427: Add separate package headers for each backend., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e498dd1dea 336/427: Drop emacsql-escape-format's KIND argument., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3042597a72 343/427: Add note about lack of Windows support., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5ad4d2da9a 355/427: fix ldlibs for berkeley-unix systems, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a96b2587c4 365/427: Update README to mention FTS5 (#40), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5ebd12b6ff 377/427: Add some support for the ESCAPE operator, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c82a0e6b4d 384/427: Add public domain statement to remaining files, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 97ccd7d9e6 398/427: Update library commentaries of package libraries, ELPA Syncer, 2022/12/13