diff options
| author | Lars Ingebrigtsen | 2022-01-26 15:02:00 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-01-26 15:02:00 +0100 |
| commit | 826959ccb4ce36c15e2dc3e1fa4a4dbc345875dc (patch) | |
| tree | 54a694b893a8eb0e8597d3bca6c81a52c0e5ae8a /test | |
| parent | 8a343ecee543faeb1be1e7e9de5f3163209f4da6 (diff) | |
| download | emacs-826959ccb4ce36c15e2dc3e1fa4a4dbc345875dc.tar.gz emacs-826959ccb4ce36c15e2dc3e1fa4a4dbc345875dc.zip | |
Fix copyright-find-copyright when searching from the end
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).
Diffstat (limited to 'test')
| -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 120cd5a6b5e..abb0913a0d7 100644 --- a/test/lisp/emacs-lisp/copyright-tests.el +++ b/test/lisp/emacs-lisp/copyright-tests.el | |||
| @@ -61,5 +61,16 @@ | |||
| 61 | (buffer-substring (- (point-max) 42) (point-max)))) | 61 | (buffer-substring (- (point-max) 42) (point-max)))) |
| 62 | "Copyright 2006, 2007, 2008, 2022 Foo Bar\n\n"))) | 62 | "Copyright 2006, 2007, 2008, 2022 Foo Bar\n\n"))) |
| 63 | 63 | ||
| 64 | (ert-deftest test-correct-notice () | ||
| 65 | (should (equal | ||
| 66 | (with-temp-buffer | ||
| 67 | (dotimes (_ 2) | ||
| 68 | (insert "Copyright 2021 FSF\n")) | ||
| 69 | (let ((copyright-at-end-flag t) | ||
| 70 | (copyright-query nil)) | ||
| 71 | (copyright-update)) | ||
| 72 | (buffer-string)) | ||
| 73 | "Copyright 2021 FSF\nCopyright 2021, 2022 FSF\n"))) | ||
| 74 | |||
| 64 | (provide 'copyright-tests) | 75 | (provide 'copyright-tests) |
| 65 | ;;; copyright-tests.el ends here | 76 | ;;; copyright-tests.el ends here |