summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-09-24 17:45:37 +0200
committerStefan Kangas <stefan@marxist.se>2021-09-26 13:23:57 +0200
commitf3a6fe2c7d5943dcf241700aaf5c10c485217f60 (patch)
tree27750f587c596bf9de0e2544342f78ee591655ba /test/lisp/emacs-lisp
parent44da8dd3e4a1e961eb7bbfdf9b1d2abad429ac3c (diff)
downloademacs-f3a6fe2c7d5943dcf241700aaf5c10c485217f60.tar.gz
emacs-f3a6fe2c7d5943dcf241700aaf5c10c485217f60.tar.bz2
emacs-f3a6fe2c7d5943dcf241700aaf5c10c485217f60.zip
Avoid false positives in bytecomp docstring width warning
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Ignore more function argument lists. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests-byte-compile--wide-docstring-p): New test.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/bytecomp-tests.el24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index d56c60b1f1d..707f597fd46 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -1470,6 +1470,30 @@ compiled correctly."
(load-file (concat file "c"))
(should (equal (bc-test-alpha-f 'a) '(nil a)))))
+(ert-deftest bytecomp-tests-byte-compile--wide-docstring-p/func-arg-list ()
+ (should-not (byte-compile--wide-docstring-p "\
+\(dbus-register-property BUS SERVICE PATH INTERFACE PROPERTY ACCESS \
+[TYPE] VALUE &optional EMITS-SIGNAL DONT-REGISTER-SERVICE)" fill-column))
+ (should-not (byte-compile--wide-docstring-p "\
+(fn CMD FLAGS FIS &key (BUF (cvs-temp-buffer)) DONT-CHANGE-DISC CVSARGS \
+POSTPROC)" fill-column))
+ ;; Bug#49007
+ (should-not (byte-compile--wide-docstring-p "\
+(fn (THIS rudel-protocol-backend) TRANSPORT \
+INFO INFO-CALLBACK &optional PROGRESS-CALLBACK)" fill-column))
+ (should-not (byte-compile--wide-docstring-p "\
+\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \
+[:tags \\='(TAG...)] BODY...)" fill-column))
+ (should-not (byte-compile--wide-docstring-p "\
+(make-soap-xs-element &key NAME NAMESPACE-TAG ID TYPE^ OPTIONAL\? MULTIPLE\? \
+REFERENCE SUBSTITUTION-GROUP ALTERNATIVES IS-GROUP)" fill-column))
+ (should-not (byte-compile--wide-docstring-p "\
+(fn NAME FIXTURE INPUT &key SKIP-PAIR-STRING EXPECTED-STRING \
+EXPECTED-POINT BINDINGS (MODES \\='\\='(ruby-mode js-mode python-mode)) \
+(TEST-IN-COMMENTS t) (TEST-IN-STRINGS t) (TEST-IN-CODE t) \
+(FIXTURE-FN \\='#\\='electric-pair-mode))" fill-column)))
+
+
;; Local Variables:
;; no-byte-compile: t
;; End: