diff options
| author | Mauro Aranda | 2021-03-04 10:13:26 -0300 |
|---|---|---|
| committer | Mauro Aranda | 2021-03-04 10:13:26 -0300 |
| commit | 986bf7ac0dbfee0522cbe1e89872309d3a4f182c (patch) | |
| tree | 0c6b1f0250288b24b2337353b53bbfdc95891fce | |
| parent | 7b99fc0069c02e02a6b9b2418a373db376f99863 (diff) | |
| download | emacs-986bf7ac0dbfee0522cbe1e89872309d3a4f182c.tar.gz emacs-986bf7ac0dbfee0522cbe1e89872309d3a4f182c.zip | |
Remove duplicated tests in checkdoc-tests.el
* test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-cl-defmethod-ok)
(checkdoc-cl-defmethod-with-types-ok, checkdoc-cl-defun-with-key-ok)
(checkdoc-cl-defun-with-allow-other-keys-ok)
(checkdoc-cl-defun-with-default-optional-value-ok)
(checkdoc-cl-defun-with-destructuring-ok): This tests were duplicated,
so keep one copy of them. Checked by diffing two files with the
suspected tests, and supported by the fact that running occur with the
regexp "^(ert-deftest" reported 14 matches, while the tests being run
were 8.
| -rw-r--r-- | test/lisp/emacs-lisp/checkdoc-tests.el | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/test/lisp/emacs-lisp/checkdoc-tests.el b/test/lisp/emacs-lisp/checkdoc-tests.el index cf7baf4ce44..93015fbb105 100644 --- a/test/lisp/emacs-lisp/checkdoc-tests.el +++ b/test/lisp/emacs-lisp/checkdoc-tests.el | |||
| @@ -82,51 +82,6 @@ | |||
| 82 | (insert "(cl-defun foo ((a b &optional c) d) \"Return A+B+C+D.\")") | 82 | (insert "(cl-defun foo ((a b &optional c) d) \"Return A+B+C+D.\")") |
| 83 | (checkdoc-defun))) | 83 | (checkdoc-defun))) |
| 84 | 84 | ||
| 85 | (ert-deftest checkdoc-cl-defmethod-ok () | ||
| 86 | "Checkdoc should be happy with a simple correct cl-defmethod." | ||
| 87 | (with-temp-buffer | ||
| 88 | (emacs-lisp-mode) | ||
| 89 | (insert "(cl-defmethod foo (a) \"Return A.\")") | ||
| 90 | (checkdoc-defun))) | ||
| 91 | |||
| 92 | (ert-deftest checkdoc-cl-defmethod-with-types-ok () | ||
| 93 | "Checkdoc should be happy with a cl-defmethod using types." | ||
| 94 | (with-temp-buffer | ||
| 95 | (emacs-lisp-mode) | ||
| 96 | ;; this method matches if A is the symbol `smthg' and if b is a list: | ||
| 97 | (insert "(cl-defmethod foo ((a (eql smthg)) (b list)) \"Return A+B.\")") | ||
| 98 | (checkdoc-defun))) | ||
| 99 | |||
| 100 | (ert-deftest checkdoc-cl-defun-with-key-ok () | ||
| 101 | "Checkdoc should be happy with a cl-defun using &key." | ||
| 102 | (with-temp-buffer | ||
| 103 | (emacs-lisp-mode) | ||
| 104 | (insert "(cl-defun foo (&key a (b 27)) \"Return :A+:B.\")") | ||
| 105 | (checkdoc-defun))) | ||
| 106 | |||
| 107 | (ert-deftest checkdoc-cl-defun-with-allow-other-keys-ok () | ||
| 108 | "Checkdoc should be happy with a cl-defun using &allow-other-keys." | ||
| 109 | (with-temp-buffer | ||
| 110 | (emacs-lisp-mode) | ||
| 111 | (insert "(cl-defun foo (&key a &allow-other-keys) \"Return :A.\")") | ||
| 112 | (checkdoc-defun))) | ||
| 113 | |||
| 114 | (ert-deftest checkdoc-cl-defun-with-default-optional-value-ok () | ||
| 115 | "Checkdoc should be happy with a cl-defun using default values for optional args." | ||
| 116 | (with-temp-buffer | ||
| 117 | (emacs-lisp-mode) | ||
| 118 | ;; B is optional and equals 1+a if not provided. HAS-BS is non-nil | ||
| 119 | ;; if B was provided in the call: | ||
| 120 | (insert "(cl-defun foo (a &optional (b (1+ a) has-bs)) \"Return A + B.\")") | ||
| 121 | (checkdoc-defun))) | ||
| 122 | |||
| 123 | (ert-deftest checkdoc-cl-defun-with-destructuring-ok () | ||
| 124 | "Checkdoc should be happy with a cl-defun destructuring its arguments." | ||
| 125 | (with-temp-buffer | ||
| 126 | (emacs-lisp-mode) | ||
| 127 | (insert "(cl-defun foo ((a b &optional c) d) \"Return A+B+C+D.\")") | ||
| 128 | (checkdoc-defun))) | ||
| 129 | |||
| 130 | (ert-deftest checkdoc-tests--next-docstring () | 85 | (ert-deftest checkdoc-tests--next-docstring () |
| 131 | "Checks that the one-argument form of `defvar' works. | 86 | "Checks that the one-argument form of `defvar' works. |
| 132 | See the comments in Bug#24998." | 87 | See the comments in Bug#24998." |