Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
language: emacs-lisp
env:
- EVM_EMACS=emacs-25.1-travis
- EVM_EMACS=emacs-25.2-travis
- EVM_EMACS=emacs-26.1-travis
- EVM_EMACS=emacs-git-snapshot-travis

Expand Down
10 changes: 8 additions & 2 deletions emacsql-sqlite3-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
(require 'emacsql)
(require 'emacsql-sqlite3)

;; Workaround for known bug of ert-runner
;; https://github.com/rejeep/ert-runner.el/issues/49
(eval-and-compile
(unless (fboundp 'ert--print-backtrace)
(defalias 'ert--print-backtrace #'backtrace-to-string)))

(defvar emacsql-tests-timeout 4
"Be aggressive about not waiting on subprocesses in unit tests.")

Expand Down Expand Up @@ -84,8 +90,8 @@
(cl-letf* ((proc (emacsql-process conn))
(retsym (make-symbol "retsym"))
((process-filter proc)
(lambda (_proc string)
(throw retsym string))))
(lambda (_proc string)
(throw retsym string))))
(catch retsym
(apply #'emacsql-sqlite3-run-dot-command conn cmd args)
(accept-process-output proc emacsql-tests-timeout))))
Expand Down
13 changes: 6 additions & 7 deletions emacsql-sqlite3.el
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,13 @@ each arg will be quoted first."
(if (looking-at (rx "Error: " (group (1+ char)) eol))
(signal 'emacsql-error (list (match-string 1)))
(cl-macrolet ((sexps-in-line! ()
`(cl-loop
until (looking-at "\n")
collect (read (current-buffer)))))
`(cl-loop until (looking-at "\n")
collect (read (current-buffer)))))
(cl-loop
until (looking-at
(concat (regexp-quote emacsql-sqlite3--cmd-end-mark) "\n"))
collect (sexps-in-line!)
do (forward-char))))))
until (looking-at
(concat (regexp-quote emacsql-sqlite3--cmd-end-mark) "\n"))
collect (sexps-in-line!)
do (forward-char))))))

(cl-defmethod emacsql-close ((conn emacsql-sqlite3-connection))
(let ((process (emacsql-process conn)))
Expand Down