branch: elpa/emacsql
commit abe43b3381fba02e481b5767343d3b690be10421
Author: Christopher Wellons <[email protected]>
Commit: Christopher Wellons <[email protected]>
Add :where test.
---
emacsql-tests.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/emacsql-tests.el b/emacsql-tests.el
index 32b984a130..59332dbe34 100644
--- a/emacsql-tests.el
+++ b/emacsql-tests.el
@@ -39,10 +39,13 @@
(defun emacsql-tests-query (query args result)
"Check that QUERY outputs RESULT for ARGS."
- (should (string= (apply #'emacsql-format (emacsql-expand query) args)
result)))
+ (should (string= (apply #'emacsql-format (emacsql-expand query) args)
+ result)))
(ert-deftest emacsql-expand ()
(emacsql-tests-query [:select [$1 name] :from $2] '(id people)
"SELECT id, name FROM people;")
(emacsql-tests-query [:select * :from employees] ()
- "SELECT * FROM employees;"))
+ "SELECT * FROM employees;")
+ (emacsql-tests-query [:select * :from employees :where (< salary 50000)] ()
+ "SELECT * FROM employees WHERE salary < 50000;"))