c32snrtombs: Add tests.
[gnulib.git] / tests / test-update-copyright.sh
blobadba7799fe83a11be36cf666523f80412924f7c4
1 #!/bin/sh
2 # Test suite for update-copyright.
3 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
4 # This file is part of the GNUlib Library.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <https://www.gnu.org/licenses/>.
19 diffout=`diff -u /dev/null /dev/null 2>&1`
20 if test x"$diffout" = x"" && test $? -eq 0; then
21 compare() { diff -u "$@"; }
22 else
23 compare() { cmp "$@"; }
26 # Ensure the update-copyright program gets found.
27 PATH=$abs_aux_dir:$PATH
28 export PATH
30 TMP_BASE=update-copyright.test
31 trap 'rm -f $TMP_BASE*' 0 1 2 3 15
33 ## --------------------------------- ##
34 ## Skip if user does not have perl. ##
35 ## --------------------------------- ##
37 TMP=$TMP_BASE
38 s=$TMP-script
39 cat <<\EOF > $s
40 #!/bin/sh
41 #! -*-perl-*-
42 # This is a prologue that allows to run a perl script as an executable
43 # on systems that are compliant to a POSIX version before POSIX:2017.
44 # On such systems, the usual invocation of an executable through execlp()
45 # or execvp() fails with ENOEXEC if it is a script that does not start
46 # with a #! line. The script interpreter mentioned in the #! line has
47 # to be /bin/sh, because on GuixSD systems that is the only program that
48 # has a fixed file name. The second line is essential for perl and is
49 # also useful for editing this file in Emacs. The next two lines below
50 # are valid code in both sh and perl. When executed by sh, they re-execute
51 # the script through the perl program found in $PATH. The '-x' option
52 # is essential as well; without it, perl would re-execute the script
53 # through /bin/sh. When executed by perl, the next two lines are a no-op.
54 eval 'exec perl -wSx -pi "$0" "$@"'
55 if 0;
57 s/a/b/
58 EOF
59 chmod a+x $s
60 echo a > $TMP-in
61 ./$s $TMP-in 2>/dev/null && test b = "`cat $TMP-in 2>/dev/null`" ||
63 printf '%s\n' "$0: skipping this test;" \
64 'your system has insufficient support for Perl' 1>&2
65 exit 77
68 # Skip this test if Perl is too old. FIXME: 5.8.0 is just a guess.
69 # We have a report that 5.6.1 is inadequate and that 5.8.0 works.
70 perl -e 'require 5.8.0' || {
71 echo '$0: skipping this test; Perl version is too old' 1>&2
72 exit 77
75 # Do not let a different envvar setting perturb results.
76 UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
77 export UPDATE_COPYRIGHT_MAX_LINE_LENGTH
79 ## ----------------------------- ##
80 ## Examples from documentation. ##
81 ## ----------------------------- ##
83 TMP=$TMP_BASE-ex
84 cat > $TMP.1 <<EOF
85 Copyright @copyright{} 1990-2005, 2007-2009 Free Software
86 Foundation, Inc.
87 EOF
88 cat > $TMP.2 <<EOF
89 # Copyright (C) 1990-2005, 2007-2009 Free Software
90 # Foundation, Inc.
91 EOF
92 cat > $TMP.3 <<EOF
94 * Copyright &copy; 90,2005,2007-2009
95 * Free Software Foundation, Inc.
97 EOF
98 cat > $TMP.4 <<EOF
99 ## Copyright (C) 1990-2005, 2007-2009 Free Software
100 # Foundation, Inc.
102 cat > $TMP.5 <<EOF
103 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
105 cat > $TMP.6 <<EOF
106 ## Copyright (C) 1990-2005, 2007-2009 Free Software
107 # Foundation, Inc.
109 Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
110 Inc.
112 cat > $TMP.7 <<EOF
113 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
115 # Copyright (C) 1990-2005, 2007-2009 Free Software
116 # Foundation, Inc.
119 UPDATE_COPYRIGHT_YEAR=2009 \
120 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
121 compare /dev/null $TMP-stdout || exit 1
122 compare - $TMP-stderr <<EOF || exit 1
123 $TMP.4: warning: copyright statement not found
124 $TMP.5: warning: copyright statement not found
126 compare - $TMP.1 <<EOF || exit 1
127 Copyright @copyright{} 1990-2005, 2007-2009 Free Software
128 Foundation, Inc.
130 compare - $TMP.2 <<EOF || exit 1
131 # Copyright (C) 1990-2005, 2007-2009 Free Software
132 # Foundation, Inc.
134 compare - $TMP.3 <<EOF || exit 1
136 * Copyright &copy; 90,2005,2007-2009
137 * Free Software Foundation, Inc.
140 compare - $TMP.4 <<EOF || exit 1
141 ## Copyright (C) 1990-2005, 2007-2009 Free Software
142 # Foundation, Inc.
144 compare - $TMP.5 <<EOF || exit 1
145 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
147 compare - $TMP.6 <<EOF || exit 1
148 ## Copyright (C) 1990-2005, 2007-2009 Free Software
149 # Foundation, Inc.
151 Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
152 Inc.
154 compare - $TMP.7 <<EOF || exit 1
155 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
157 # Copyright (C) 1990-2005, 2007-2009 Free Software
158 # Foundation, Inc.
161 UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
162 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
163 compare /dev/null $TMP-stdout || exit 1
164 compare - $TMP-stderr <<EOF || exit 1
165 $TMP.4: warning: copyright statement not found
166 $TMP.5: warning: copyright statement not found
168 compare - $TMP.1 <<EOF || exit 1
169 Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation,
170 Inc.
172 compare - $TMP.2 <<EOF || exit 1
173 # Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
175 compare - $TMP.3 <<EOF || exit 1
177 * Copyright &copy; 1990, 2005, 2007-2010 Free Software Foundation, Inc.
180 compare - $TMP.4 <<EOF || exit 1
181 ## Copyright (C) 1990-2005, 2007-2009 Free Software
182 # Foundation, Inc.
184 compare - $TMP.5 <<EOF || exit 1
185 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
187 compare - $TMP.6 <<EOF || exit 1
188 ## Copyright (C) 1990-2005, 2007-2009 Free Software
189 # Foundation, Inc.
191 Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
193 compare - $TMP.7 <<EOF || exit 1
194 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
196 # Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
199 UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
200 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
201 compare /dev/null $TMP-stdout || exit 1
202 compare - $TMP-stderr <<EOF || exit 1
203 $TMP.4: warning: copyright statement not found
204 $TMP.5: warning: copyright statement not found
206 compare - $TMP.1 <<EOF || exit 1
207 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
208 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
209 Free Software Foundation, Inc.
211 compare - $TMP.2 <<EOF || exit 1
212 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
213 # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
214 # Software Foundation, Inc.
216 compare - $TMP.3 <<EOF || exit 1
218 * Copyright &copy; 1990, 2005, 2007, 2008, 2009, 2010 Free Software
219 * Foundation, Inc.
222 compare - $TMP.4 <<EOF || exit 1
223 ## Copyright (C) 1990-2005, 2007-2009 Free Software
224 # Foundation, Inc.
226 compare - $TMP.5 <<EOF || exit 1
227 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
229 compare - $TMP.6 <<EOF || exit 1
230 ## Copyright (C) 1990-2005, 2007-2009 Free Software
231 # Foundation, Inc.
233 Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
234 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
235 Software Foundation, Inc.
237 compare - $TMP.7 <<EOF || exit 1
238 Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
240 # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
241 # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
242 # Software Foundation, Inc.
245 rm $TMP*
247 ## -------------- ##
248 ## Current year. ##
249 ## -------------- ##
251 TMP=$TMP_BASE-current-year
252 YEAR=`date +%Y`
253 cat > $TMP <<EOF
254 '\" Copyright (C) 2006
255 '\" Free Software Foundation,
256 '\" Inc.
258 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
259 compare /dev/null $TMP-stdout || exit 1
260 compare /dev/null $TMP-stderr || exit 1
261 compare - $TMP <<EOF || exit 1
262 '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
264 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
265 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
266 compare /dev/null $TMP-stdout || exit 1
267 compare /dev/null $TMP-stderr || exit 1
268 compare - $TMP <<EOF || exit 1
269 '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
271 rm $TMP*
273 ## ------------------ ##
274 ## Surrounding text. ##
275 ## ------------------ ##
277 TMP=$TMP_BASE-surrounding-text
278 cat > $TMP <<EOF
279 Undisturbed text.
280 dnl Undisturbed text.
281 dnl Copyright (C) 89
282 dnl Free Software Foundation, Inc.
283 dnl Undisturbed text.
285 UPDATE_COPYRIGHT_YEAR=2010 \
286 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
287 compare /dev/null $TMP-stdout || exit 1
288 compare /dev/null $TMP-stderr || exit 1
289 compare - $TMP <<EOF || exit 1
290 Undisturbed text.
291 dnl Undisturbed text.
292 dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc.
293 dnl Undisturbed text.
295 rm $TMP*
297 ## --------------- ##
298 ## Widest prefix. ##
299 ## --------------- ##
301 TMP=$TMP_BASE-widest-prefix
302 cat > $TMP <<EOF
303 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
304 #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
305 #### 2008 Free Software Foundation, Inc.
307 UPDATE_COPYRIGHT_YEAR=2010 \
308 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
309 compare /dev/null $TMP-stdout || exit 1
310 compare /dev/null $TMP-stderr || exit 1
311 compare - $TMP <<EOF || exit 1
312 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984,
313 #### 1985, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
314 #### 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
316 UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
317 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
318 compare /dev/null $TMP-stdout || exit 1
319 compare /dev/null $TMP-stderr || exit 1
320 compare - $TMP <<EOF || exit 1
321 #### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software
322 #### Foundation, Inc.
324 rm $TMP*
326 ## ------------------- ##
327 ## Prefix too large. ##
328 ## ------------------- ##
330 TMP=$TMP_BASE-prefix-too-large
331 cat > $TMP <<EOF
332 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
333 #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
334 #### 2008 Free Software Foundation, Inc.
336 UPDATE_COPYRIGHT_YEAR=2010 \
337 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
338 compare /dev/null $TMP-stdout || exit 1
339 compare - $TMP-stderr <<EOF || exit 1
340 $TMP: warning: copyright statement not found
342 compare - $TMP <<EOF || exit 1
343 #### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
344 #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
345 #### 2008 Free Software Foundation, Inc.
347 rm $TMP*
349 ## ------------- ##
350 ## Blank lines. ##
351 ## ------------- ##
353 TMP=$TMP_BASE-blank-lines
354 cat > $TMP <<EOF
355 #Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
357 #1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
358 #2008 Free Software Foundation, Inc.
360 Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
362 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
363 2008 Free Software Foundation, Inc.
365 UPDATE_COPYRIGHT_YEAR=2010 \
366 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
367 compare /dev/null $TMP-stdout || exit 1
368 compare - $TMP-stderr <<EOF || exit 1
369 $TMP: warning: copyright statement not found
371 compare - $TMP <<EOF || exit 1
372 #Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
374 #1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
375 #2008 Free Software Foundation, Inc.
377 Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
379 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
380 2008 Free Software Foundation, Inc.
382 rm $TMP*
384 ## -------------- ##
385 ## Leading tabs. ##
386 ## -------------- ##
388 TMP=$TMP_BASE-leading-tabs
389 cat > $TMP <<EOF
390 Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98,
391 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
392 Software Foundation, Inc.
394 UPDATE_COPYRIGHT_YEAR=2010 \
395 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
396 compare /dev/null $TMP-stdout || exit 1
397 compare /dev/null $TMP-stderr || exit 1
398 compare - $TMP <<EOF || exit 1
399 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
400 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
401 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
403 UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
404 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
405 compare /dev/null $TMP-stdout || exit 1
406 compare /dev/null $TMP-stderr || exit 1
407 compare - $TMP <<EOF || exit 1
408 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
409 Inc.
411 rm $TMP*
413 ## -------------------- ##
414 ## Unusual whitespace. ##
415 ## -------------------- ##
417 TMP=$TMP_BASE-unusual-ws
418 cat > $TMP <<EOF
419 # Copyright (C) 87-88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
420 # 98, 1999, 2000, 2001, 2002, 2003, \f 2004, 2005, 2006, 2007, 2008,
421 # 2009 Free Software Foundation, Inc.
423 UPDATE_COPYRIGHT_YEAR=2010 \
424 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
425 compare /dev/null $TMP-stdout || exit 1
426 compare /dev/null $TMP-stderr || exit 1
427 compare - $TMP <<EOF || exit 1
428 # Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994,
429 # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
430 # 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
431 # Foundation, Inc.
433 UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
434 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
435 compare /dev/null $TMP-stdout || exit 1
436 compare /dev/null $TMP-stderr || exit 1
437 compare - $TMP <<EOF || exit 1
438 # Copyright (C) 1987-1988, 1991-2011 Free Software
439 # Foundation, Inc.
441 UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=2 \
442 UPDATE_COPYRIGHT_FORCE=1 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
443 compare /dev/null $TMP-stdout || exit 1
444 compare /dev/null $TMP-stderr || exit 1
445 compare - $TMP <<EOF || exit 1
446 # Copyright (C) 1987-2011 Free Software Foundation, Inc.
448 rm $TMP*
450 ## --------- ##
451 ## DOS EOL. ##
452 ## --------- ##
454 TMP=$TMP_BASE-dos-eol
455 tr @ '\015' > $TMP <<\EOF
456 Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
457 Rem 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
458 Rem 2009 Free Software Foundation, Inc.@
460 UPDATE_COPYRIGHT_YEAR=2010 \
461 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
462 compare /dev/null $TMP-stdout || exit 1
463 compare /dev/null $TMP-stderr || exit 1
464 tr @ '\015' > $TMP-exp <<\EOF
465 Rem Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
466 Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
467 Rem 2009, 2010 Free Software Foundation, Inc.@
469 compare $TMP-exp $TMP || exit 1
470 rm $TMP*
472 ## --------------- ##
473 ## Omitted "(C)". ##
474 ## --------------- ##
476 TMP=$TMP_BASE-omitted-circle-c
477 cat > $TMP <<EOF
478 Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
479 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
480 2009 Free Software Foundation, Inc.
482 UPDATE_COPYRIGHT_YEAR=2010 \
483 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
484 compare /dev/null $TMP-stdout || exit 1
485 compare /dev/null $TMP-stderr || exit 1
486 compare - $TMP <<EOF || exit 1
487 Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
488 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
489 Free Software Foundation, Inc.
491 rm $TMP*
493 ## ------------------ ##
494 ## C-style comments. ##
495 ## ------------------ ##
497 TMP=$TMP_BASE-c-style-comments
498 cat > $TMP.star <<EOF
499 /* Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
500 * 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
501 * 2009 Free Software Foundation, Inc. */
503 cat > $TMP.space <<EOF
504 /*Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
505 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
506 2009 Free Software Foundation, Inc. */
508 cat > $TMP.single-line <<EOF
509 /* Copyright 87, 1991, 1992 Free Software Foundation, Inc. */
511 cat > $TMP.single-line-wrapped <<EOF
512 /* Copyright 1988, 1991, 1992, 1993 Free Software Foundation, Inc. */
514 cat > $TMP.extra-text-star <<EOF
515 /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. End
516 * More comments. */
518 cat > $TMP.extra-text-space <<EOF
519 /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. ***
520 * End of comments. */
522 cat > $TMP.two-digit-final-is-substr-of-first <<EOF
523 /* Copyright 1991, 99 Free Software Foundation, Inc. */
525 UPDATE_COPYRIGHT_YEAR=2010 \
526 update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
527 compare /dev/null $TMP-stdout || exit 1
528 compare /dev/null $TMP-stderr || exit 1
529 compare - $TMP.star <<EOF || exit 1
530 /* Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
531 * 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
532 * 2009, 2010 Free Software Foundation, Inc. */
534 compare - $TMP.space <<EOF || exit 1
535 /*Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
536 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
537 2009, 2010 Free Software Foundation, Inc. */
539 compare - $TMP.single-line <<EOF || exit 1
540 /* Copyright 1987, 1991, 1992, 2010 Free Software Foundation, Inc. */
542 compare - $TMP.single-line-wrapped <<EOF || exit 1
543 /* Copyright 1988, 1991, 1992, 1993, 2010 Free Software Foundation,
544 * Inc. */
546 compare - $TMP.extra-text-star <<EOF || exit 1
547 /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
548 * Inc. End
549 * More comments. */
551 compare - $TMP.extra-text-space <<EOF || exit 1
552 /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
553 Inc. ***
554 * End of comments. */
556 compare - $TMP.two-digit-final-is-substr-of-first <<EOF || exit 1
557 /* Copyright 1991, 1999, 2010 Free Software Foundation, Inc. */
559 rm $TMP*
561 exit 0