update-copyright: avoid copyright notice date corruption
authorJim Meyering <jim@meyering.net>
Thu, 3 Jan 2013 09:23:30 +0000 (10:23 +0100)
committerJim Meyering <jim@meyering.net>
Thu, 3 Jan 2013 09:41:25 +0000 (10:41 +0100)
commit4f439be5eb433f530123e45c5d87d5af91f952ac
treeeb1cc96ce4989dcbf2603cd297886698ced82c78
parent964bbc2d419584e93fe629ddbc40595612f62083
update-copyright: avoid copyright notice date corruption

Given a sequence of copyright year numbers in which the final
one was a two-digit number that happened to be a substring of
a preceding four-digit year number, we would mistakenly update
the substring (from two- to four-digit) rather than the two-digit
number at the end, which, combined with the addition of the current
4-digit year number would yield two 5-digit year numbers, e.g.,
here, it would convert the first "99" to "1999, 2013" rather than
the final one:
  1991, 99
  11999, 20131, 1999
* build-aux/update-copyright: Tighten a regexp.
* tests/test-update-copyright.sh: Add a test case to trigger the bug.
Reported by Joseph Myers in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/32281
ChangeLog
build-aux/update-copyright
tests/test-update-copyright.sh