aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-01-13 17:39:53 +0100
committerStefan Kangas2021-01-13 17:39:53 +0100
commitbe9b7e83bc4191aff01c692be0f7a156ec4056da (patch)
tree2c9352edbcb5ce2057759046132073d8da11593d
parent19b169c4e22abe5112d36ff4740f382409f6acdf (diff)
downloademacs-be9b7e83bc4191aff01c692be0f7a156ec4056da.tar.gz
emacs-be9b7e83bc4191aff01c692be0f7a156ec4056da.zip
Prefer skip-unless in more tests
* test/lisp/emacs-lisp/timer-tests.el (timer-tests-debug-timer-check): * test/src/decompress-tests.el (zlib--decompress): * test/src/xml-tests.el (libxml-tests): Prefer skip-unless.
-rw-r--r--test/lisp/emacs-lisp/timer-tests.el4
-rw-r--r--test/src/decompress-tests.el20
-rw-r--r--test/src/xml-tests.el14
3 files changed, 19 insertions, 19 deletions
diff --git a/test/lisp/emacs-lisp/timer-tests.el b/test/lisp/emacs-lisp/timer-tests.el
index 74da33eff69..7856c217f9e 100644
--- a/test/lisp/emacs-lisp/timer-tests.el
+++ b/test/lisp/emacs-lisp/timer-tests.el
@@ -36,8 +36,8 @@
36 36
37(ert-deftest timer-tests-debug-timer-check () 37(ert-deftest timer-tests-debug-timer-check ()
38 ;; This function exists only if --enable-checking. 38 ;; This function exists only if --enable-checking.
39 (if (fboundp 'debug-timer-check) 39 (skip-unless (fboundp 'debug-timer-check))
40 (should (debug-timer-check)) t)) 40 (should (debug-timer-check)))
41 41
42(ert-deftest timer-test-multiple-of-time () 42(ert-deftest timer-test-multiple-of-time ()
43 (should (time-equal-p 43 (should (time-equal-p
diff --git a/test/src/decompress-tests.el b/test/src/decompress-tests.el
index 67a7fefb05e..520445cca5a 100644
--- a/test/src/decompress-tests.el
+++ b/test/src/decompress-tests.el
@@ -29,16 +29,16 @@
29 29
30(ert-deftest zlib--decompress () 30(ert-deftest zlib--decompress ()
31 "Test decompressing a gzipped file." 31 "Test decompressing a gzipped file."
32 (when (and (fboundp 'zlib-available-p) 32 (skip-unless (and (fboundp 'zlib-available-p)
33 (zlib-available-p)) 33 (zlib-available-p)))
34 (should (string= 34 (should (string=
35 (with-temp-buffer 35 (with-temp-buffer
36 (set-buffer-multibyte nil) 36 (set-buffer-multibyte nil)
37 (insert-file-contents-literally 37 (insert-file-contents-literally
38 (expand-file-name "foo.gz" zlib-tests-data-directory)) 38 (expand-file-name "foo.gz" zlib-tests-data-directory))
39 (zlib-decompress-region (point-min) (point-max)) 39 (zlib-decompress-region (point-min) (point-max))
40 (buffer-string)) 40 (buffer-string))
41 "foo\n")))) 41 "foo\n")))
42 42
43(provide 'decompress-tests) 43(provide 'decompress-tests)
44 44
diff --git a/test/src/xml-tests.el b/test/src/xml-tests.el
index 632cf965fa2..a35b4d2ccc8 100644
--- a/test/src/xml-tests.el
+++ b/test/src/xml-tests.el
@@ -44,12 +44,12 @@
44 44
45(ert-deftest libxml-tests () 45(ert-deftest libxml-tests ()
46 "Test libxml." 46 "Test libxml."
47 (when (fboundp 'libxml-parse-xml-region) 47 (skip-unless (fboundp 'libxml-parse-xml-region))
48 (with-temp-buffer 48 (with-temp-buffer
49 (dolist (test libxml-tests--data-comments-preserved) 49 (dolist (test libxml-tests--data-comments-preserved)
50 (erase-buffer) 50 (erase-buffer)
51 (insert (car test)) 51 (insert (car test))
52 (should (equal (cdr test) 52 (should (equal (cdr test)
53 (libxml-parse-xml-region (point-min) (point-max)))))))) 53 (libxml-parse-xml-region (point-min) (point-max)))))))
54 54
55;;; libxml-tests.el ends here 55;;; libxml-tests.el ends here