summaryrefslogtreecommitdiff
path: root/tests/test-update-copyright.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-update-copyright.sh')
-rwxr-xr-xtests/test-update-copyright.sh24
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh
index 83275ad..60cb372 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-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -102,9 +102,8 @@ 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 <<EOF || exit 1
$TMP.4: warning: copyright statement not found
@@ -145,9 +144,8 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# 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
+ 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: copyright statement not found
@@ -184,9 +182,8 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# 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
+ 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: copyright statement not found
@@ -427,6 +424,13 @@ compare - $TMP <<EOF || exit 1
# Copyright (C) 1987-1988, 1991-2011 Free Software
# Foundation, Inc.
EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=2 \
+ UPDATE_COPYRIGHT_FORCE=1 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ # Copyright (C) 1987-2011 Free Software Foundation, Inc.
+EOF
rm $TMP*
## --------- ##
@@ -501,6 +505,9 @@ cat > $TMP.extra-text-space <<EOF
/* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. ***
* End of comments. */
EOF
+cat > $TMP.two-digit-final-is-substr-of-first <<EOF
+ /* Copyright 1991, 99 Free Software Foundation, Inc. */
+EOF
UPDATE_COPYRIGHT_YEAR=2010 \
update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
@@ -532,6 +539,9 @@ compare - $TMP.extra-text-space <<EOF || exit 1
Inc. ***
* End of comments. */
EOF
+compare - $TMP.two-digit-final-is-substr-of-first <<EOF || exit 1
+ /* Copyright 1991, 1999, 2010 Free Software Foundation, Inc. */
+EOF
rm $TMP*
exit 0