1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-09 07:40:39 -08:00

Fix copyright.el comment and add a test

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).
This commit is contained in:
Lars Ingebrigtsen 2022-01-26 14:53:07 +01:00
parent afd1fdf6bb
commit 8a343ecee5
2 changed files with 12 additions and 1 deletions

View file

@ -50,5 +50,16 @@
(dolist (test copyright-tests--data)
(with-copyright-test (car test) (cdr test))))
(ert-deftest test-end-chop ()
(should
(equal
(with-temp-buffer
(let ((copyright-query nil))
(insert (make-string (- copyright-limit 14) ?x) "\n"
"\nCopyright 2006, 2007, 2008 Foo Bar\n\n")
(copyright-update)
(buffer-substring (- (point-max) 42) (point-max))))
"Copyright 2006, 2007, 2008, 2022 Foo Bar\n\n")))
(provide 'copyright-tests)
;;; copyright-tests.el ends here