1438 |
20 Dec 11 |
peter |
#!/bin/sh |
1438 |
20 Dec 11 |
peter |
# $Id$ |
1438 |
20 Dec 11 |
peter |
3 |
# |
1515 |
26 Sep 12 |
peter |
# Copyright (C) 2011, 2012 Peter Johansson |
1438 |
20 Dec 11 |
peter |
5 |
# |
1438 |
20 Dec 11 |
peter |
# This file is part of svndigest, http://dev.thep.lu.se/svndigest |
1438 |
20 Dec 11 |
peter |
7 |
# |
1438 |
20 Dec 11 |
peter |
# svndigest is free software; you can redistribute it and/or modify it |
1438 |
20 Dec 11 |
peter |
# under the terms of the GNU General Public License as published by |
1438 |
20 Dec 11 |
peter |
# the Free Software Foundation; either version 3 of the License, or |
1438 |
20 Dec 11 |
peter |
# (at your option) any later version. |
1438 |
20 Dec 11 |
peter |
12 |
# |
1438 |
20 Dec 11 |
peter |
# svndigest is distributed in the hope that it will be useful, but |
1438 |
20 Dec 11 |
peter |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
1438 |
20 Dec 11 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1438 |
20 Dec 11 |
peter |
# General Public License for more details. |
1438 |
20 Dec 11 |
peter |
17 |
# |
1438 |
20 Dec 11 |
peter |
# You should have received a copy of the GNU General Public License |
1438 |
20 Dec 11 |
peter |
# along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
1438 |
20 Dec 11 |
peter |
20 |
|
1438 |
20 Dec 11 |
peter |
21 |
required="repo" |
1438 |
20 Dec 11 |
peter |
22 |
|
1525 |
01 Oct 12 |
peter |
23 |
. test/init.sh || exit 99 |
1438 |
20 Dec 11 |
peter |
24 |
set -e |
1438 |
20 Dec 11 |
peter |
25 |
|
1438 |
20 Dec 11 |
peter |
26 |
run_svncopyright_with_ignore () |
1438 |
20 Dec 11 |
peter |
27 |
{ |
1438 |
20 Dec 11 |
peter |
28 |
ignore=$1 |
1438 |
20 Dec 11 |
peter |
29 |
$SVN revert -R toy_project |
1438 |
20 Dec 11 |
peter |
30 |
cp toy_project/.svndigest/config config |
1438 |
20 Dec 11 |
peter |
31 |
cat >> config << _EOF |
1438 |
20 Dec 11 |
peter |
32 |
[svn-props] |
1551 |
03 Nov 12 |
peter |
33 |
Node.h = svncopyright:ignore=$ignore |
1438 |
20 Dec 11 |
peter |
34 |
_EOF |
1438 |
20 Dec 11 |
peter |
35 |
cat config |
1438 |
20 Dec 11 |
peter |
# do not use --ignore-cache so we also test that cache is ignored automatically |
1453 |
23 Dec 11 |
peter |
37 |
SVNCOPYRIGHT_run 0 --verbose --root toy_project --config-file=config |
1438 |
20 Dec 11 |
peter |
38 |
} |
1438 |
20 Dec 11 |
peter |
39 |
|
1551 |
03 Nov 12 |
peter |
# log for AUTHORS |
1551 |
03 Nov 12 |
peter |
# r4 jari 2006 |
1551 |
03 Nov 12 |
peter |
# r21 jari 2006 |
1551 |
03 Nov 12 |
peter |
# r22 jari 2006 |
1551 |
03 Nov 12 |
peter |
# r23 jari 2006 |
1551 |
03 Nov 12 |
peter |
# r41 peter 2007 |
1551 |
03 Nov 12 |
peter |
# r42 peter 2007 only updated copyright |
1551 |
03 Nov 12 |
peter |
# r44 peter 2007 only copyright |
1551 |
03 Nov 12 |
peter |
# r47 peter 2007 only copyright |
1551 |
03 Nov 12 |
peter |
# r67 peter 2009 only copyright |
1551 |
03 Nov 12 |
peter |
50 |
|
1438 |
20 Dec 11 |
peter |
# no ignore |
1453 |
23 Dec 11 |
peter |
52 |
SVNCOPYRIGHT_run 0 -v --ignore-cache --root toy_project |
1551 |
03 Nov 12 |
peter |
53 |
$GREP "2006 Jari" toy_project/lib/Node.h || exit_fail |
1551 |
03 Nov 12 |
peter |
54 |
$GREP "2007 Peter" toy_project/lib/Node.h || exit_fail |
1438 |
20 Dec 11 |
peter |
55 |
|
1551 |
03 Nov 12 |
peter |
56 |
run_svncopyright_with_ignore 21 |
1551 |
03 Nov 12 |
peter |
57 |
$GREP "2006 Jari" toy_project/lib/Node.h || exit_fail |
1551 |
03 Nov 12 |
peter |
58 |
$GREP "2007 Peter" toy_project/lib/Node.h || exit_fail |
1438 |
20 Dec 11 |
peter |
59 |
|
1551 |
03 Nov 12 |
peter |
60 |
run_svncopyright_with_ignore "-30" |
1551 |
03 Nov 12 |
peter |
61 |
$GREP "2006 Jari" toy_project/lib/Node.h && exit_fail |
1551 |
03 Nov 12 |
peter |
62 |
$GREP "2007 Peter" toy_project/lib/Node.h || exit_fail |
1438 |
20 Dec 11 |
peter |
63 |
|
1551 |
03 Nov 12 |
peter |
64 |
run_svncopyright_with_ignore "1" |
1551 |
03 Nov 12 |
peter |
65 |
$GREP "2006 Jari" toy_project/lib/Node.h || exit_fail |
1438 |
20 Dec 11 |
peter |
66 |
|
1551 |
03 Nov 12 |
peter |
67 |
run_svncopyright_with_ignore "1-22" |
1551 |
03 Nov 12 |
peter |
68 |
$GREP "2006 Jari" toy_project/lib/Node.h || exit_fail |
1438 |
20 Dec 11 |
peter |
69 |
|
1551 |
03 Nov 12 |
peter |
70 |
run_svncopyright_with_ignore "1-23" |
1551 |
03 Nov 12 |
peter |
71 |
$GREP "2006 Jari" toy_project/lib/Node.h && exit_fail |
1438 |
20 Dec 11 |
peter |
72 |
|
1551 |
03 Nov 12 |
peter |
73 |
run_svncopyright_with_ignore "41-" |
1551 |
03 Nov 12 |
peter |
74 |
$GREP "2006 Jari" toy_project/lib/Node.h || exit_fail |
1551 |
03 Nov 12 |
peter |
75 |
$GREP "2007 Peter" toy_project/lib/Node.h && exit_fail |
1438 |
20 Dec 11 |
peter |
76 |
|
1456 |
24 Dec 11 |
peter |
# test that nonsense argument fails with grace |
1453 |
23 Dec 11 |
peter |
78 |
$SVN revert toy_project -R |
1448 |
22 Dec 11 |
peter |
79 |
cat > config << _EOF |
1448 |
22 Dec 11 |
peter |
80 |
[svn-props] |
1551 |
03 Nov 12 |
peter |
81 |
Node.h = svncopyright:ignore=nonsense |
1448 |
22 Dec 11 |
peter |
82 |
_EOF |
1448 |
22 Dec 11 |
peter |
83 |
cat config |
1448 |
22 Dec 11 |
peter |
# do not use --ignore-cache so we also test that cache is ignored automatically |
1453 |
23 Dec 11 |
peter |
85 |
SVNCOPYRIGHT_run 1 -v --root toy_project --config-file=config |
1453 |
23 Dec 11 |
peter |
86 |
$GREP svncopyright: stderr || exit_fail |
1453 |
23 Dec 11 |
peter |
87 |
$GREP yat stderr && exit_fail |
1438 |
20 Dec 11 |
peter |
88 |
|
1460 |
29 Feb 12 |
peter |
# test ignore property on both Node and subNode |
1456 |
24 Dec 11 |
peter |
90 |
$SVN revert toy_project -R |
1456 |
24 Dec 11 |
peter |
91 |
cat > config << _EOF |
1456 |
24 Dec 11 |
peter |
92 |
[copyright-alias] |
1456 |
24 Dec 11 |
peter |
93 |
jari = Jari |
1456 |
24 Dec 11 |
peter |
94 |
peter = Peter |
1456 |
24 Dec 11 |
peter |
95 |
[svn-props] |
1551 |
03 Nov 12 |
peter |
96 |
Node.h = svncopyright:ignore=41 |
1456 |
24 Dec 11 |
peter |
97 |
toy_project = svncopyright:ignore=42 |
1456 |
24 Dec 11 |
peter |
98 |
_EOF |
1456 |
24 Dec 11 |
peter |
99 |
cat config |
1456 |
24 Dec 11 |
peter |
# do not use --ignore-cache so we also test that cache is ignored automatically |
1456 |
24 Dec 11 |
peter |
101 |
SVNCOPYRIGHT_run 0 -v --root toy_project --config-file=config |
1551 |
03 Nov 12 |
peter |
102 |
$GREP "Copyright (C) 2006" toy_project/lib/Node.h || exit_fail |
1551 |
03 Nov 12 |
peter |
103 |
$GREP "Copyright (C) 2007" toy_project/lib/Node.h && exit_fail |
1453 |
23 Dec 11 |
peter |
104 |
|
1438 |
20 Dec 11 |
peter |
105 |
exit_success |