diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-26 14:53:07 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-26 15:03:33 +0100 |
commit | ed18d08f6f3041e6fd1806690c24ca6b31deab2d (patch) | |
tree | 32d36faf977c6d2f268a613b625c89f66c767dca /test/lisp/emacs-lisp | |
parent | 7eca80b20444f7bd7bcb6a66a9054e029f0e7013 (diff) | |
download | emacs-ed18d08f6f3041e6fd1806690c24ca6b31deab2d.tar.gz emacs-ed18d08f6f3041e6fd1806690c24ca6b31deab2d.tar.bz2 emacs-ed18d08f6f3041e6fd1806690c24ca6b31deab2d.zip |
Fix copyright.el comment and add a test
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).
Do not merge to master.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/copyright-tests.el | 11 |
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 |