]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
authorGlenn Morris <rgm@gnu.org>
Thu, 25 Apr 2019 23:53:02 +0000 (19:53 -0400)
committerGlenn Morris <rgm@gnu.org>
Thu, 25 Apr 2019 23:53:02 +0000 (19:53 -0400)
Skip if no sqlite program.

test/lisp/progmodes/sql-tests.el

index ad1f797652630f338233f6d78821f2b704f59420..ef8fe58506e313f0d0a3152e7017f65b7fdc845b 100644 (file)
@@ -331,20 +331,22 @@ yield OUTP."
 The ACTION will be tested after set-up of PRODUCT."
 
   (declare (indent 1))
-  `(let (new-bufs)
-     (cl-letf
-         (((symbol-function 'make-comint-in-buffer)
-           (lambda (_name buffer _program &optional _startfile &rest _switches)
-             (let ((b (get-buffer-create buffer)))
-               (message ">>make-comint-in-buffer %S" b)
-               (cl-pushnew b new-bufs) ;; Keep track of what we create
-               b))))
-
-       (let (,(intern (format "sql-%s-login-params" product)))
-         ,@action)
-
-       (let (kill-buffer-query-functions) ;; Kill what we create
-         (mapc #'kill-buffer new-bufs)))))
+  `(progn
+     (skip-unless (executable-find sql-sqlite-program))
+     (let (new-bufs)
+       (cl-letf
+           (((symbol-function 'make-comint-in-buffer)
+             (lambda (_name buffer _program &optional _startfile &rest _switches)
+               (let ((b (get-buffer-create buffer)))
+                 (message ">>make-comint-in-buffer %S" b)
+                 (cl-pushnew b new-bufs) ;; Keep track of what we create
+                 b))))
+
+         (let (,(intern (format "sql-%s-login-params" product)))
+           ,@action)
+
+         (let (kill-buffer-query-functions) ;; Kill what we create
+           (mapc #'kill-buffer new-bufs))))))
 
 (ert-deftest sql-tests-buffer-naming-default ()
   "Test buffer naming."