1#!/bin/sh 2# Test suite for update-copyright. 3# Copyright (C) 2009-2021 Free Software Foundation, Inc. 4# This file is part of the GNUlib Library. 5# 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. 10# 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. 15# 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/>. 18 19diffout=`diff -u /dev/null /dev/null 2>&1` 20if test x"$diffout" = x"" && test $? -eq 0; then 21 compare() { diff -u "$@"; } 22else 23 compare() { cmp "$@"; } 24fi 25 26# Ensure the update-copyright program gets found. 27PATH=$abs_aux_dir:$PATH 28export PATH 29 30TMP_BASE=update-copyright.test 31trap 'rm -f $TMP_BASE*' 0 1 2 3 15 32 33## --------------------------------- ## 34## Skip if user does not have perl. ## 35## --------------------------------- ## 36 37TMP=$TMP_BASE 38s=$TMP-script 39cat <<\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. 54eval 'exec perl -wSx -pi "$0" "$@"' 55 if 0; 56 57s/a/b/ 58EOF 59chmod a+x $s 60echo a > $TMP-in 61./$s $TMP-in 2>/dev/null && test b = "`cat $TMP-in 2>/dev/null`" || 62 { 63 printf '%s\n' "$0: skipping this test;" \ 64 'your system has insufficient support for Perl' 1>&2 65 exit 77 66 } 67 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. 70perl -e 'require 5.8.0' || { 71 echo '$0: skipping this test; Perl version is too old' 1>&2 72 exit 77 73} 74 75# Do not let a different envvar setting perturb results. 76UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72 77export UPDATE_COPYRIGHT_MAX_LINE_LENGTH 78 79## ----------------------------- ## 80## Examples from documentation. ## 81## ----------------------------- ## 82 83TMP=$TMP_BASE-ex 84cat > $TMP.1 <<EOF 85Copyright @copyright{} 1990-2005, 2007-2009 Free Software 86Foundation, Inc. 87EOF 88cat > $TMP.2 <<EOF 89# Copyright (C) 1990-2005, 2007-2009 Free Software 90# Foundation, Inc. 91EOF 92cat > $TMP.3 <<EOF 93/* 94 * Copyright © 90,2005,2007-2009 95 * Free Software Foundation, Inc. 96 */ 97EOF 98cat > $TMP.4 <<EOF 99## Copyright (C) 1990-2005, 2007-2009 Free Software 100# Foundation, Inc. 101EOF 102cat > $TMP.5 <<EOF 103Copyright (C) 1990-2005, 2007-2009 Acme, Inc. 104EOF 105cat > $TMP.6 <<EOF 106## Copyright (C) 1990-2005, 2007-2009 Free Software 107# Foundation, Inc. 108 109Copyright (C) 1990-2005, 2007-2009 Free Software Foundation, 110Inc. 111EOF 112cat > $TMP.7 <<EOF 113Copyright (C) 1990-2005, 2007-2009 Acme, Inc. 114 115# Copyright (C) 1990-2005, 2007-2009 Free Software 116# Foundation, Inc. 117EOF 118 119UPDATE_COPYRIGHT_YEAR=2009 \ 120 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr 121compare /dev/null $TMP-stdout || exit 1 122compare - $TMP-stderr <<EOF || exit 1 123$TMP.4: warning: copyright statement not found 124$TMP.5: warning: copyright statement not found 125EOF 126compare - $TMP.1 <<EOF || exit 1 127Copyright @copyright{} 1990-2005, 2007-2009 Free Software 128Foundation, Inc. 129EOF 130compare - $TMP.2 <<EOF || exit 1 131# Copyright (C) 1990-2005, 2007-2009 Free Software 132# Foundation, Inc. 133EOF 134compare - $TMP.3 <<EOF || exit 1 135/* 136 * Copyright © 90,2005,2007-2009 137 * Free Software Foundation, Inc. 138 */ 139EOF 140compare - $TMP.4 <<EOF || exit 1 141## Copyright (C) 1990-2005, 2007-2009 Free Software 142# Foundation, Inc. 143EOF 144compare - $TMP.5 <<EOF || exit 1 145Copyright (C) 1990-2005, 2007-2009 Acme, Inc. 146EOF 147compare - $TMP.6 <<EOF || exit 1 148## Copyright (C) 1990-2005, 2007-2009 Free Software 149# Foundation, Inc. 150 151Copyright (C) 1990-2005, 2007-2009 Free Software Foundation, 152Inc. 153EOF 154compare - $TMP.7 <<EOF || exit 1 155Copyright (C) 1990-2005, 2007-2009 Acme, Inc. 156 157# Copyright (C) 1990-2005, 2007-2009 Free Software 158# Foundation, Inc. 159EOF 160 161UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ 162 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr 163compare /dev/null $TMP-stdout || exit 1 164compare - $TMP-stderr <<EOF || exit 1 165$TMP.4: warning: copyright statement not found 166$TMP.5: warning: copyright statement not found 167EOF 168compare - $TMP.1 <<EOF || exit 1 169Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation, 170Inc. 171EOF 172compare - $TMP.2 <<EOF || exit 1 173# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc. 174EOF 175compare - $TMP.3 <<EOF || exit 1 176/* 177 * Copyright © 1990, 2005, 2007-2010 Free Software Foundation, Inc. 178 */ 179EOF 180compare - $TMP.4 <<EOF || exit 1 181## Copyright (C) 1990-2005, 2007-2009 Free Software 182# Foundation, Inc. 183EOF 184compare - $TMP.5 <<EOF || exit 1 185Copyright (C) 1990-2005, 2007-2009 Acme, Inc. 186EOF 187compare - $TMP.6 <<EOF || exit 1 188## Copyright (C) 1990-2005, 2007-2009 Free Software 189# Foundation, Inc. 190 191Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc. 192EOF 193compare - $TMP.7 <<EOF || exit 1 194Copyright (C) 1990-2005, 2007-2009 Acme, Inc. 195 196# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc. 197EOF 198 199UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \ 200 update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr 201compare /dev/null $TMP-stdout || exit 1 202compare - $TMP-stderr <<EOF || exit 1 203$TMP.4: warning: copyright statement not found 204$TMP.5: warning: copyright statement not found 205EOF 206compare - $TMP.1 <<EOF || exit 1 207Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2081998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 209Free Software Foundation, Inc. 210EOF 211compare - $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. 215EOF 216compare - $TMP.3 <<EOF || exit 1 217/* 218 * Copyright © 1990, 2005, 2007, 2008, 2009, 2010 Free Software 219 * Foundation, Inc. 220 */ 221EOF 222compare - $TMP.4 <<EOF || exit 1 223## Copyright (C) 1990-2005, 2007-2009 Free Software 224# Foundation, Inc. 225EOF 226compare - $TMP.5 <<EOF || exit 1 227Copyright (C) 1990-2005, 2007-2009 Acme, Inc. 228EOF 229compare - $TMP.6 <<EOF || exit 1 230## Copyright (C) 1990-2005, 2007-2009 Free Software 231# Foundation, Inc. 232 233Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2341999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free 235Software Foundation, Inc. 236EOF 237compare - $TMP.7 <<EOF || exit 1 238Copyright (C) 1990-2005, 2007-2009 Acme, Inc. 239 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. 243EOF 244 245rm $TMP* 246 247## -------------- ## 248## Current year. ## 249## -------------- ## 250 251TMP=$TMP_BASE-current-year 252YEAR=`date +%Y` 253cat > $TMP <<EOF 254'\" Copyright (C) 2006 255'\" Free Software Foundation, 256'\" Inc. 257EOF 258update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 259compare /dev/null $TMP-stdout || exit 1 260compare /dev/null $TMP-stderr || exit 1 261compare - $TMP <<EOF || exit 1 262'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc. 263EOF 264UPDATE_COPYRIGHT_USE_INTERVALS=1 \ 265 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 266compare /dev/null $TMP-stdout || exit 1 267compare /dev/null $TMP-stderr || exit 1 268compare - $TMP <<EOF || exit 1 269'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc. 270EOF 271rm $TMP* 272 273## ------------------ ## 274## Surrounding text. ## 275## ------------------ ## 276 277TMP=$TMP_BASE-surrounding-text 278cat > $TMP <<EOF 279 Undisturbed text. 280dnl Undisturbed text. 281dnl Copyright (C) 89 282dnl Free Software Foundation, Inc. 283dnl Undisturbed text. 284EOF 285UPDATE_COPYRIGHT_YEAR=2010 \ 286 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 287compare /dev/null $TMP-stdout || exit 1 288compare /dev/null $TMP-stderr || exit 1 289compare - $TMP <<EOF || exit 1 290 Undisturbed text. 291dnl Undisturbed text. 292dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc. 293dnl Undisturbed text. 294EOF 295rm $TMP* 296 297## --------------- ## 298## Widest prefix. ## 299## --------------- ## 300 301TMP=$TMP_BASE-widest-prefix 302cat > $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. 306EOF 307UPDATE_COPYRIGHT_YEAR=2010 \ 308 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 309compare /dev/null $TMP-stdout || exit 1 310compare /dev/null $TMP-stderr || exit 1 311compare - $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. 315EOF 316UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ 317 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 318compare /dev/null $TMP-stdout || exit 1 319compare /dev/null $TMP-stderr || exit 1 320compare - $TMP <<EOF || exit 1 321#### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software 322#### Foundation, Inc. 323EOF 324rm $TMP* 325 326## ------------------- ## 327## Prefix too large. ## 328## ------------------- ## 329 330TMP=$TMP_BASE-prefix-too-large 331cat > $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. 335EOF 336UPDATE_COPYRIGHT_YEAR=2010 \ 337 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 338compare /dev/null $TMP-stdout || exit 1 339compare - $TMP-stderr <<EOF || exit 1 340$TMP: warning: copyright statement not found 341EOF 342compare - $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. 346EOF 347rm $TMP* 348 349## ------------- ## 350## Blank lines. ## 351## ------------- ## 352 353TMP=$TMP_BASE-blank-lines 354cat > $TMP <<EOF 355#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 356# 357#1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 358#2008 Free Software Foundation, Inc. 359 360Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 361 3621986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 3632008 Free Software Foundation, Inc. 364EOF 365UPDATE_COPYRIGHT_YEAR=2010 \ 366 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 367compare /dev/null $TMP-stdout || exit 1 368compare - $TMP-stderr <<EOF || exit 1 369$TMP: warning: copyright statement not found 370EOF 371compare - $TMP <<EOF || exit 1 372#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 373# 374#1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 375#2008 Free Software Foundation, Inc. 376 377Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 378 3791986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 3802008 Free Software Foundation, Inc. 381EOF 382rm $TMP* 383 384## -------------- ## 385## Leading tabs. ## 386## -------------- ## 387 388TMP=$TMP_BASE-leading-tabs 389cat > $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. 393EOF 394UPDATE_COPYRIGHT_YEAR=2010 \ 395 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 396compare /dev/null $TMP-stdout || exit 1 397compare /dev/null $TMP-stderr || exit 1 398compare - $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. 402EOF 403UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ 404 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 405compare /dev/null $TMP-stdout || exit 1 406compare /dev/null $TMP-stderr || exit 1 407compare - $TMP <<EOF || exit 1 408 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation, 409 Inc. 410EOF 411rm $TMP* 412 413## -------------------- ## 414## Unusual whitespace. ## 415## -------------------- ## 416 417TMP=$TMP_BASE-unusual-ws 418cat > $TMP <<EOF 419 # Copyright (C) 87-88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 420 # 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 421 # 2009 Free Software Foundation, Inc. 422EOF 423UPDATE_COPYRIGHT_YEAR=2010 \ 424 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 425compare /dev/null $TMP-stdout || exit 1 426compare /dev/null $TMP-stderr || exit 1 427compare - $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. 432EOF 433UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \ 434 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 435compare /dev/null $TMP-stdout || exit 1 436compare /dev/null $TMP-stderr || exit 1 437compare - $TMP <<EOF || exit 1 438 # Copyright (C) 1987-1988, 1991-2011 Free Software 439 # Foundation, Inc. 440EOF 441UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=2 \ 442 UPDATE_COPYRIGHT_FORCE=1 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 443compare /dev/null $TMP-stdout || exit 1 444compare /dev/null $TMP-stderr || exit 1 445compare - $TMP <<EOF || exit 1 446 # Copyright (C) 1987-2011 Free Software Foundation, Inc. 447EOF 448rm $TMP* 449 450## --------- ## 451## DOS EOL. ## 452## --------- ## 453 454TMP=$TMP_BASE-dos-eol 455tr @ '\015' > $TMP <<\EOF 456Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@ 457Rem 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@ 458Rem 2009 Free Software Foundation, Inc.@ 459EOF 460UPDATE_COPYRIGHT_YEAR=2010 \ 461 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 462compare /dev/null $TMP-stdout || exit 1 463compare /dev/null $TMP-stderr || exit 1 464tr @ '\015' > $TMP-exp <<\EOF 465Rem Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@ 466Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@ 467Rem 2009, 2010 Free Software Foundation, Inc.@ 468EOF 469compare $TMP-exp $TMP || exit 1 470rm $TMP* 471 472## --------------- ## 473## Omitted "(C)". ## 474## --------------- ## 475 476TMP=$TMP_BASE-omitted-circle-c 477cat > $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. 481EOF 482UPDATE_COPYRIGHT_YEAR=2010 \ 483 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr 484compare /dev/null $TMP-stdout || exit 1 485compare /dev/null $TMP-stderr || exit 1 486compare - $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. 490EOF 491rm $TMP* 492 493## ------------------ ## 494## C-style comments. ## 495## ------------------ ## 496 497TMP=$TMP_BASE-c-style-comments 498cat > $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. */ 502EOF 503cat > $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. */ 507EOF 508cat > $TMP.single-line <<EOF 509/* Copyright 87, 1991, 1992 Free Software Foundation, Inc. */ 510EOF 511cat > $TMP.single-line-wrapped <<EOF 512 /* Copyright 1988, 1991, 1992, 1993 Free Software Foundation, Inc. */ 513EOF 514cat > $TMP.extra-text-star <<EOF 515 /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. End 516 * More comments. */ 517EOF 518cat > $TMP.extra-text-space <<EOF 519 /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. *** 520 * End of comments. */ 521EOF 522cat > $TMP.two-digit-final-is-substr-of-first <<EOF 523 /* Copyright 1991, 99 Free Software Foundation, Inc. */ 524EOF 525UPDATE_COPYRIGHT_YEAR=2010 \ 526 update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr 527compare /dev/null $TMP-stdout || exit 1 528compare /dev/null $TMP-stderr || exit 1 529compare - $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. */ 533EOF 534compare - $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. */ 538EOF 539compare - $TMP.single-line <<EOF || exit 1 540/* Copyright 1987, 1991, 1992, 2010 Free Software Foundation, Inc. */ 541EOF 542compare - $TMP.single-line-wrapped <<EOF || exit 1 543 /* Copyright 1988, 1991, 1992, 1993, 2010 Free Software Foundation, 544 * Inc. */ 545EOF 546compare - $TMP.extra-text-star <<EOF || exit 1 547 /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation, 548 * Inc. End 549 * More comments. */ 550EOF 551compare - $TMP.extra-text-space <<EOF || exit 1 552 /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation, 553 Inc. *** 554 * End of comments. */ 555EOF 556compare - $TMP.two-digit-final-is-substr-of-first <<EOF || exit 1 557 /* Copyright 1991, 1999, 2010 Free Software Foundation, Inc. */ 558EOF 559rm $TMP* 560 561exit 0 562