[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql db3b941bb6 3/8: Run compiler and connector tests s
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql db3b941bb6 3/8: Run compiler and connector tests separately |
Date: |
Fri, 15 Nov 2024 15:59:38 -0500 (EST) |
branch: elpa/emacsql
commit db3b941bb61d195ed4673e0e5820e0abe56ab52e
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Run compiler and connector tests separately
---
Makefile | 9 ++++++---
tests/emacsql-compiler-tests.el | 3 +--
tests/emacsql-external-tests.el | 7 +++++--
tests/emacsql-tests.el | 19 -------------------
4 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/Makefile b/Makefile
index 5c7c6c4e76..c718e39fbc 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,6 @@ ELCS = $(ELS:.el=.elc)
TEST_ELS = tests/emacsql-compiler-tests.el
TEST_ELS += tests/emacsql-external-tests.el
-TEST_ELS += tests/emacsql-tests.el
TEST_ELCS = $(TEST_ELS:.el=.elc)
DEPS = pg
@@ -94,8 +93,12 @@ $(PKG)-autoloads.el: $(ELS)
2>&1 | sed "/^Package autoload is deprecated$$/d"
test: all $(TEST_ELCS)
- @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) \
- -L tests -l tests/emacsql-tests.elc -f ert-run-tests-batch-and-exit
+ @printf "Running compiler tests...\n"
+ @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -L tests \
+ -l tests/emacsql-compiler-tests.elc -f ert-run-tests-batch-and-exit
+ @printf "Running connector tests...\n"
+ @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -L tests \
+ -l tests/emacsql-external-tests.elc -f ert-run-tests-batch-and-exit
ifeq ($(CI), true)
override GITSTATS = gitstats/gitstats
diff --git a/tests/emacsql-compiler-tests.el b/tests/emacsql-compiler-tests.el
index 56193a57a0..900672b005 100644
--- a/tests/emacsql-compiler-tests.el
+++ b/tests/emacsql-compiler-tests.el
@@ -12,6 +12,7 @@
(should (string= (emacsql-escape-identifier 'foo) "foo"))
(should (string= (emacsql-escape-identifier 'a\ b) "\"a\\ b\""))
(should (string= (emacsql-escape-identifier '$foo) "\"$foo\""))
+ (emacsql-register-reserved '(SELECT))
(should (string= (emacsql-escape-identifier 'select) "\"select\""))
(should-error (emacsql-escape-identifier 10))
(should-error (emacsql-escape-identifier nil))
@@ -252,6 +253,4 @@
([:select (or (& (<= x (+ y 1) (- z)) 1) (>= x z y))] '()
"SELECT (y + 1 BETWEEN x AND -z) & 1 OR z BETWEEN y AND x;")))
-(provide 'emacsql-compiler-tests)
-
;;; emacsql-tests.el ends here
diff --git a/tests/emacsql-external-tests.el b/tests/emacsql-external-tests.el
index 251b7785ae..0ec46bb13d 100644
--- a/tests/emacsql-external-tests.el
+++ b/tests/emacsql-external-tests.el
@@ -79,6 +79,11 @@
(nreverse factories))
"List of connection factories to use in unit tests.")
+(cl-eval-when (load eval)
+ (princ (format "Testing %d connector(s): %s\n"
+ (length emacsql-tests-connection-factories)
+ (mapcar #'car emacsql-tests-connection-factories))))
+
(ert-deftest emacsql-basic ()
"A short test that fully interacts with SQLite."
(let ((emacsql-global-timeout emacsql-tests-timeout))
@@ -153,6 +158,4 @@
(should (equal (emacsql db [:select * :from test-table])
'(("") (\))))))))
-(provide 'emacsql-external-tests)
-
;;; emacsql-external-tests.el ends here
diff --git a/tests/emacsql-tests.el b/tests/emacsql-tests.el
deleted file mode 100644
index 6cd86acdc6..0000000000
--- a/tests/emacsql-tests.el
+++ /dev/null
@@ -1,19 +0,0 @@
-;;; emacsql-tests.el --- Test suite for EmacSQL -*- lexical-binding:t -*-
-
-;; This is free and unencumbered software released into the public domain.
-
-;;; Code:
-
-(require 'cl-lib)
-(require 'emacsql-compiler-tests)
-(require 'emacsql-external-tests)
-
-;; Print testing information
-(cl-eval-when (load eval)
- (princ (format "\nTesting %d database(s): %S\n"
- (length emacsql-tests-connection-factories)
- (mapcar #'car emacsql-tests-connection-factories))))
-
-(provide 'emacsql-tests)
-
-;;; emacsql-tests.el ends here
- [nongnu] elpa/emacsql updated (fb05d0f727 -> 491105a01f), ELPA Syncer, 2024/11/15
- [nongnu] elpa/emacsql 9789d8e77d 2/8: Capitalize summary lines in test files, ELPA Syncer, 2024/11/15
- [nongnu] elpa/emacsql 8e036c9123 5/8: Don't warn about missing back-ends during compilation, ELPA Syncer, 2024/11/15
- [nongnu] elpa/emacsql 9b877ddb7a 7/8: Refactor setup of test connectors, ELPA Syncer, 2024/11/15
- [nongnu] elpa/emacsql db3b941bb6 3/8: Run compiler and connector tests separately,
ELPA Syncer <=
- [nongnu] elpa/emacsql 491105a01f 8/8: Fix gitstats in CI, ELPA Syncer, 2024/11/15
- [nongnu] elpa/emacsql 7a79c2be3d 6/8: Remove original connector using a custom SQLite binary, ELPA Syncer, 2024/11/15
- [nongnu] elpa/emacsql b84102f111 4/8: Show more warnings about skipped connector tests, ELPA Syncer, 2024/11/15
- [nongnu] elpa/emacsql ecbd2acc12 1/8: Require Emacs 26.1, ELPA Syncer, 2024/11/15