Fix copyright tests for 2023 onwards
authorMattias EngdegÄrd <mattiase@acm.org>
Sun, 1 Jan 2023 12:18:50 +0000 (13:18 +0100)
committerSean Whitton <spwhitton@spwhitton.name>
Wed, 18 Jan 2023 00:26:59 +0000 (17:26 -0700)
This upstream patch has been incorporated to fix the problem:

  ; * test/lisp/emacs-lisp/copyright-tests.el: Fix and future-safe.

Origin: upstream, commit: da77d70deeb2798693ec4f28a291befeb8e43989
Bug-Debian: https://bugs.debian.org/1028607
Forwarded: not-needed

test/lisp/emacs-lisp/copyright-tests.el

index abb0913a0d79cf644f79a8932fc06cf7b48ab664..040071d90d02402e3f6f99a34e8a80537c8f7861 100644 (file)
@@ -59,7 +59,8 @@
                 "\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")))
+    (format "Copyright 2006, 2007, 2008, %s Foo Bar\n\n"
+            (format-time-string "%Y")))))
 
 (ert-deftest test-correct-notice ()
   (should (equal
@@ -70,7 +71,8 @@
                    (copyright-query nil))
                (copyright-update))
              (buffer-string))
-           "Copyright 2021 FSF\nCopyright 2021, 2022 FSF\n")))
+           (format "Copyright 2021 FSF\nCopyright 2021, %s FSF\n"
+                   (format-time-string "%Y")))))
 
 (provide 'copyright-tests)
 ;;; copyright-tests.el ends here