diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index c0adab75269..102616c9bb7 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el | |||
| @@ -972,6 +972,17 @@ byte-compiled. Run with dynamic binding." | |||
| 972 | (bytecomp--with-warning-test "defvar.*foo.*wider than.*characters" | 972 | (bytecomp--with-warning-test "defvar.*foo.*wider than.*characters" |
| 973 | `(defvar foo t ,bytecomp-tests--docstring))) | 973 | `(defvar foo t ,bytecomp-tests--docstring))) |
| 974 | 974 | ||
| 975 | (ert-deftest bytecomp-warn-wide-docstring/cl-defsubst () | ||
| 976 | (bytecomp--without-warning-test | ||
| 977 | `(cl-defsubst short-name () | ||
| 978 | "Do something.")) | ||
| 979 | (bytecomp--without-warning-test | ||
| 980 | `(cl-defsubst long-name-with-less-80-characters-but-still-quite-a-bit () | ||
| 981 | "Do something.")) | ||
| 982 | (bytecomp--with-warning-test "wider than.*characters" | ||
| 983 | `(cl-defsubst long-name-with-more-than-80-characters-yes-this-is-a-very-long-name-but-why-not!! () | ||
| 984 | "Do something."))) | ||
| 985 | |||
| 975 | (ert-deftest bytecomp-warn-quoted-condition () | 986 | (ert-deftest bytecomp-warn-quoted-condition () |
| 976 | (bytecomp--with-warning-test | 987 | (bytecomp--with-warning-test |
| 977 | "Warning: `condition-case' condition should not be quoted: 'arith-error" | 988 | "Warning: `condition-case' condition should not be quoted: 'arith-error" |