Skip to content

Commit

Permalink
[FIX] Coverage reported as 0%
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr committed Dec 11, 2024
1 parent 5dbb951 commit 3899779
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 12 deletions.
14 changes: 11 additions & 3 deletions syncthing-common-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@

(defun syncthing-ert-cleanup ()
(should (eq nil syncthing--servers))
(dolist (buf (buffer-list))
(unless (or (string-match-p (regexp-quote "*Messages*") (buffer-name buf)))
(kill-buffer buf))))
(mapc
(lambda (buff)
(unless
(or (string-match-p (regexp-quote "*Messages*") (buffer-name buff))
(string-match-p (regexp-quote " *code-conversion-work*")
(buffer-name buff))
(string-match-p (regexp-quote " *code-converting-work*")
(buffer-name buff))
(string-match-p "syncthing.*\\.el" (buffer-name buff)))
(kill-buffer buff)))
(buffer-list)))

(ert-deftest syncthing-alist-var-access ()
"Convert 'a' (string) to 'a (symbol) and access value with alist-get."
Expand Down
14 changes: 11 additions & 3 deletions syncthing-keyboard-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@

(defun syncthing-ert-cleanup ()
(should (eq nil syncthing--servers))
(dolist (buf (buffer-list))
(unless (or (string-match-p (regexp-quote "*Messages*") (buffer-name buf)))
(kill-buffer buf))))
(mapc
(lambda (buff)
(unless
(or (string-match-p (regexp-quote "*Messages*") (buffer-name buff))
(string-match-p (regexp-quote " *code-conversion-work*")
(buffer-name buff))
(string-match-p (regexp-quote " *code-converting-work*")
(buffer-name buff))
(string-match-p "syncthing.*\\.el" (buffer-name buff)))
(kill-buffer buff)))
(buffer-list)))

(ert-deftest syncthing-keyboard-newline-apply ()
"Call widget's `:action' when `point' is on top of it."
Expand Down
14 changes: 11 additions & 3 deletions syncthing-network-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@

(defun syncthing-ert-cleanup ()
(should (eq nil syncthing--servers))
(dolist (buf (buffer-list))
(unless (or (string-match-p (regexp-quote "*Messages*") (buffer-name buf)))
(kill-buffer buf))))
(mapc
(lambda (buff)
(unless
(or (string-match-p (regexp-quote "*Messages*") (buffer-name buff))
(string-match-p (regexp-quote " *code-conversion-work*")
(buffer-name buff))
(string-match-p (regexp-quote " *code-converting-work*")
(buffer-name buff))
(string-match-p "syncthing.*\\.el" (buffer-name buff)))
(kill-buffer buff)))
(buffer-list)))

(ert-deftest syncthing-ping-failure ()
"Throw an auth error on bad token."
Expand Down
14 changes: 11 additions & 3 deletions syncthing-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@

(defun syncthing-ert-cleanup ()
(should (eq nil syncthing--servers))
(dolist (buf (buffer-list))
(unless (or (string-match-p (regexp-quote "*Messages*") (buffer-name buf)))
(kill-buffer buf))))
(mapc
(lambda (buff)
(unless
(or (string-match-p (regexp-quote "*Messages*") (buffer-name buff))
(string-match-p (regexp-quote " *code-conversion-work*")
(buffer-name buff))
(string-match-p (regexp-quote " *code-converting-work*")
(buffer-name buff))
(string-match-p "syncthing.*\\.el" (buffer-name buff)))
(kill-buffer buff)))
(buffer-list)))

(ert-deftest syncthing-run-customize ()
"Run `customize-variable' on missing API token."
Expand Down

0 comments on commit 3899779

Please sign in to comment.