Skip to content

Commit 3899779

Browse files
committed
[FIX] Coverage reported as 0%
1 parent 5dbb951 commit 3899779

4 files changed

+44
-12
lines changed

Diff for: syncthing-common-tests.el

+11-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@
1515

1616
(defun syncthing-ert-cleanup ()
1717
(should (eq nil syncthing--servers))
18-
(dolist (buf (buffer-list))
19-
(unless (or (string-match-p (regexp-quote "*Messages*") (buffer-name buf)))
20-
(kill-buffer buf))))
18+
(mapc
19+
(lambda (buff)
20+
(unless
21+
(or (string-match-p (regexp-quote "*Messages*") (buffer-name buff))
22+
(string-match-p (regexp-quote " *code-conversion-work*")
23+
(buffer-name buff))
24+
(string-match-p (regexp-quote " *code-converting-work*")
25+
(buffer-name buff))
26+
(string-match-p "syncthing.*\\.el" (buffer-name buff)))
27+
(kill-buffer buff)))
28+
(buffer-list)))
2129

2230
(ert-deftest syncthing-alist-var-access ()
2331
"Convert 'a' (string) to 'a (symbol) and access value with alist-get."

Diff for: syncthing-keyboard-tests.el

+11-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@
1515

1616
(defun syncthing-ert-cleanup ()
1717
(should (eq nil syncthing--servers))
18-
(dolist (buf (buffer-list))
19-
(unless (or (string-match-p (regexp-quote "*Messages*") (buffer-name buf)))
20-
(kill-buffer buf))))
18+
(mapc
19+
(lambda (buff)
20+
(unless
21+
(or (string-match-p (regexp-quote "*Messages*") (buffer-name buff))
22+
(string-match-p (regexp-quote " *code-conversion-work*")
23+
(buffer-name buff))
24+
(string-match-p (regexp-quote " *code-converting-work*")
25+
(buffer-name buff))
26+
(string-match-p "syncthing.*\\.el" (buffer-name buff)))
27+
(kill-buffer buff)))
28+
(buffer-list)))
2129

2230
(ert-deftest syncthing-keyboard-newline-apply ()
2331
"Call widget's `:action' when `point' is on top of it."

Diff for: syncthing-network-tests.el

+11-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@
1515

1616
(defun syncthing-ert-cleanup ()
1717
(should (eq nil syncthing--servers))
18-
(dolist (buf (buffer-list))
19-
(unless (or (string-match-p (regexp-quote "*Messages*") (buffer-name buf)))
20-
(kill-buffer buf))))
18+
(mapc
19+
(lambda (buff)
20+
(unless
21+
(or (string-match-p (regexp-quote "*Messages*") (buffer-name buff))
22+
(string-match-p (regexp-quote " *code-conversion-work*")
23+
(buffer-name buff))
24+
(string-match-p (regexp-quote " *code-converting-work*")
25+
(buffer-name buff))
26+
(string-match-p "syncthing.*\\.el" (buffer-name buff)))
27+
(kill-buffer buff)))
28+
(buffer-list)))
2129

2230
(ert-deftest syncthing-ping-failure ()
2331
"Throw an auth error on bad token."

Diff for: syncthing-tests.el

+11-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@
1616

1717
(defun syncthing-ert-cleanup ()
1818
(should (eq nil syncthing--servers))
19-
(dolist (buf (buffer-list))
20-
(unless (or (string-match-p (regexp-quote "*Messages*") (buffer-name buf)))
21-
(kill-buffer buf))))
19+
(mapc
20+
(lambda (buff)
21+
(unless
22+
(or (string-match-p (regexp-quote "*Messages*") (buffer-name buff))
23+
(string-match-p (regexp-quote " *code-conversion-work*")
24+
(buffer-name buff))
25+
(string-match-p (regexp-quote " *code-converting-work*")
26+
(buffer-name buff))
27+
(string-match-p "syncthing.*\\.el" (buffer-name buff)))
28+
(kill-buffer buff)))
29+
(buffer-list)))
2230

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

0 commit comments

Comments
 (0)