summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-26 14:53:07 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-26 14:53:07 +0100
commit8a343ecee543faeb1be1e7e9de5f3163209f4da6 (patch)
treeebb598128186067220d204e8192fdfbd066aa5bf /test/lisp/emacs-lisp
parentafd1fdf6bb85600e6d7fafcdbff367c0f964a576 (diff)
downloademacs-8a343ecee543faeb1be1e7e9de5f3163209f4da6.tar.gz
emacs-8a343ecee543faeb1be1e7e9de5f3163209f4da6.tar.bz2
emacs-8a343ecee543faeb1be1e7e9de5f3163209f4da6.zip
Fix copyright.el comment and add a test
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix comment (bug#7179).
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/copyright-tests.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/copyright-tests.el b/test/lisp/emacs-lisp/copyright-tests.el
index dc82974a99e..120cd5a6b5e 100644
--- a/test/lisp/emacs-lisp/copyright-tests.el
+++ b/test/lisp/emacs-lisp/copyright-tests.el
@@ -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