projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update NEWS.stable
[gnulib.git]
/
tests
/
test-update-copyright.sh
diff --git
a/tests/test-update-copyright.sh
b/tests/test-update-copyright.sh
index
2d1022a
..
a1fce0b
100755
(executable)
--- a/
tests/test-update-copyright.sh
+++ b/
tests/test-update-copyright.sh
@@
-1,6
+1,6
@@
#!/bin/sh
# Test suite for update-copyright.
#!/bin/sh
# Test suite for update-copyright.
-# Copyright (C) 2009-201
0
Free Software Foundation, Inc.
+# Copyright (C) 2009-201
1
Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@
-23,6
+23,10
@@
else
compare() { cmp "$@"; }
fi
compare() { cmp "$@"; }
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
TMP_BASE=update-copyright.test
trap 'rm -f $TMP_BASE*' 0 1 2 3 15
@@
-47,6
+51,13
@@
echo a > $TMP-in
exit 77
}
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
# Do not let a different envvar setting perturb results.
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
export UPDATE_COPYRIGHT_MAX_LINE_LENGTH
@@
-91,13
+102,12
@@
Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# Foundation, Inc.
EOF
# Foundation, Inc.
EOF
-rm -f $TMP.*.bak
UPDATE_COPYRIGHT_YEAR=2009 \
update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
UPDATE_COPYRIGHT_YEAR=2009 \
update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
-$TMP.4: warning:
FSF
copyright statement not found
-$TMP.5: warning:
FSF
copyright statement not found
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
EOF
compare - $TMP.1 <<EOF || exit 1
Copyright @copyright{} 1990-2005, 2007-2009 Free Software
EOF
compare - $TMP.1 <<EOF || exit 1
Copyright @copyright{} 1990-2005, 2007-2009 Free Software
@@
-134,13
+144,12
@@
Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# Foundation, Inc.
EOF
# Foundation, Inc.
EOF
-rm -f $TMP.*.bak
UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
-$TMP.4: warning:
FSF
copyright statement not found
-$TMP.5: warning:
FSF
copyright statement not found
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
EOF
compare - $TMP.1 <<EOF || exit 1
Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation,
EOF
compare - $TMP.1 <<EOF || exit 1
Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation,
@@
-173,13
+182,12
@@
Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
EOF
# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
EOF
-rm -f $TMP.*.bak
UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
-$TMP.4: warning:
FSF
copyright statement not found
-$TMP.5: warning:
FSF
copyright statement not found
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
EOF
compare - $TMP.1 <<EOF || exit 1
Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
EOF
compare - $TMP.1 <<EOF || exit 1
Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
@@
-315,7
+323,7
@@
UPDATE_COPYRIGHT_YEAR=2010 \
update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
-$TMP: warning:
FSF
copyright statement not found
+$TMP: warning: copyright statement not found
EOF
compare - $TMP <<EOF || exit 1
#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
EOF
compare - $TMP <<EOF || exit 1
#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
@@
-344,7
+352,7
@@
UPDATE_COPYRIGHT_YEAR=2010 \
update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
-$TMP: warning:
FSF
copyright statement not found
+$TMP: warning: copyright statement not found
EOF
compare - $TMP <<EOF || exit 1
#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
EOF
compare - $TMP <<EOF || exit 1
#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,