X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-update-copyright.sh;h=759a9372dbfff84b3fbf770a47f6fd80068403ed;hb=c43cc7b973f4daf0c59368ae52e130dfd12ce8d6;hp=971f651f93aed48af3cedf221a6ea450948a722f;hpb=1deb9358a06e44b923b11a506d5fd727a8c68e25;p=gnulib.git
diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh
index 971f651f9..759a9372d 100755
--- a/tests/test-update-copyright.sh
+++ b/tests/test-update-copyright.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Test suite for update-copyright.
-# Copyright (C) 2009-2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -16,10 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-# Skip this test if Perl is too old. FIXME: 5.8.0 is just a guess.
-# We have a report that 5.6.1 is inadequate and that 5.8.0 works.
-perl -e 'require 5.8.0' || exit 77
-
diffout=`diff -u /dev/null /dev/null 2>&1`
if test x"$diffout" = x"" && test $? -eq 0; then
compare() { diff -u "$@"; }
@@ -29,6 +25,7 @@ fi
# Ensure the update-copyright program gets found.
PATH=$abs_aux_dir:$PATH
+export PATH
TMP_BASE=update-copyright.test
trap 'rm -f $TMP_BASE*' 0 1 2 3 15
@@ -54,6 +51,13 @@ echo a > $TMP-in
exit 77
}
+# Skip this test if Perl is too old. FIXME: 5.8.0 is just a guess.
+# We have a report that 5.6.1 is inadequate and that 5.8.0 works.
+perl -e 'require 5.8.0' || {
+ echo '$0: skipping this test; Perl version is too old' 1>&2
+ exit 77
+}
+
# Do not let a different envvar setting perturb results.
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
export UPDATE_COPYRIGHT_MAX_LINE_LENGTH
@@ -98,13 +102,12 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# Foundation, Inc.
EOF
-rm -f $TMP.*.bak
UPDATE_COPYRIGHT_YEAR=2009 \
- update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP < $TMP.extra-text-space < $TMP.two-digit-final-is-substr-of-first < $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
@@ -528,6 +539,9 @@ compare - $TMP.extra-text-space <