1421 |
14 Dec 11 |
peter |
#!/bin/sh |
1421 |
14 Dec 11 |
peter |
# $Id$ |
1421 |
14 Dec 11 |
peter |
3 |
# |
1532 |
05 Oct 12 |
peter |
# Copyright (C) 2011, 2012 Peter Johansson |
1421 |
14 Dec 11 |
peter |
5 |
# |
1421 |
14 Dec 11 |
peter |
# This file is part of svndigest, http://dev.thep.lu.se/svndigest |
1421 |
14 Dec 11 |
peter |
7 |
# |
1421 |
14 Dec 11 |
peter |
# svndigest is free software; you can redistribute it and/or modify it |
1421 |
14 Dec 11 |
peter |
# under the terms of the GNU General Public License as published by |
1421 |
14 Dec 11 |
peter |
# the Free Software Foundation; either version 3 of the License, or |
1421 |
14 Dec 11 |
peter |
# (at your option) any later version. |
1421 |
14 Dec 11 |
peter |
12 |
# |
1421 |
14 Dec 11 |
peter |
# svndigest is distributed in the hope that it will be useful, but |
1421 |
14 Dec 11 |
peter |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
1421 |
14 Dec 11 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1421 |
14 Dec 11 |
peter |
# General Public License for more details. |
1421 |
14 Dec 11 |
peter |
17 |
# |
1421 |
14 Dec 11 |
peter |
# You should have received a copy of the GNU General Public License |
1421 |
14 Dec 11 |
peter |
# along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
1421 |
14 Dec 11 |
peter |
20 |
|
1421 |
14 Dec 11 |
peter |
21 |
required="repo" |
1421 |
14 Dec 11 |
peter |
22 |
|
1525 |
01 Oct 12 |
peter |
23 |
. test/init.sh || exit 99 |
1421 |
14 Dec 11 |
peter |
24 |
set -e |
1421 |
14 Dec 11 |
peter |
25 |
|
1421 |
14 Dec 11 |
peter |
# clean up |
1421 |
14 Dec 11 |
peter |
27 |
rm -rf toy_project/bin/.svndigest/* |
1421 |
14 Dec 11 |
peter |
28 |
rm -rf toy_project/empty/.svndigest/* |
1421 |
14 Dec 11 |
peter |
29 |
rm -rf toy_project/dir_to_be_ignored/.svndigest/* |
1421 |
14 Dec 11 |
peter |
30 |
|
1421 |
14 Dec 11 |
peter |
# Create fake old cache file |
1421 |
14 Dec 11 |
peter |
32 |
$mkdir_p toy_project/bin/.svndigest |
1421 |
14 Dec 11 |
peter |
33 |
echo dummie > toy_project/bin/.svndigest/foo.svndigest-cache |
1421 |
14 Dec 11 |
peter |
34 |
$mkdir_p toy_project/empty/.svndigest |
1421 |
14 Dec 11 |
peter |
35 |
echo dummie > toy_project/empty/.svndigest/foo.svndigest-cache |
1421 |
14 Dec 11 |
peter |
36 |
$mkdir_p toy_project/dir_to_be_ignored/.svndigest |
1421 |
14 Dec 11 |
peter |
37 |
echo dummie > toy_project/dir_to_be_ignored/.svndigest/foo.svndigest-cache |
1421 |
14 Dec 11 |
peter |
38 |
echo dummie > toy_project/dir_to_be_ignored/.svndigest/SVNproperty.cc.svndigest-cache |
1421 |
14 Dec 11 |
peter |
39 |
|
1421 |
14 Dec 11 |
peter |
40 |
|
1421 |
14 Dec 11 |
peter |
41 |
|
1421 |
14 Dec 11 |
peter |
42 |
SVNDIGEST_run 0 --root toy_project --no-report |
1421 |
14 Dec 11 |
peter |
43 |
test -r toy_project/bin/.svndigest/Parameter.cc.svndigest-cache || exit_fail |
1421 |
14 Dec 11 |
peter |
44 |
test -e toy_project/bin/.svndigest/foo.svndigest-cache && exit_fail |
1421 |
14 Dec 11 |
peter |
45 |
test -e toy_project/empty/.svndigest/foo.svndigest-cache && exit_fail |
1421 |
14 Dec 11 |
peter |
46 |
test -e toy_project/dir_to_be_ignored/.svndigest/foo.svndigest-cache \ |
1421 |
14 Dec 11 |
peter |
47 |
&& exit_fail |
1421 |
14 Dec 11 |
peter |
48 |
test -e toy_project/dir_to_be_ignored/.svndigest/SVNproperty.cc.svndigest-cache\ |
1421 |
14 Dec 11 |
peter |
49 |
|| exit_fail |
1421 |
14 Dec 11 |
peter |
50 |
test -e toy_project/empty/.svndigest && exit_fail |
1423 |
16 Dec 11 |
peter |
51 |
test -e toy_project/dir_to_be_ignored/.svndigest || exit_fail |
1421 |
14 Dec 11 |
peter |
52 |
|
1421 |
14 Dec 11 |
peter |
# === testing svncopyright === |
1421 |
14 Dec 11 |
peter |
54 |
|
1421 |
14 Dec 11 |
peter |
# Create fake old cache file |
1421 |
14 Dec 11 |
peter |
56 |
$mkdir_p toy_project/bin/.svndigest |
1421 |
14 Dec 11 |
peter |
57 |
echo dummie > toy_project/bin/.svndigest/foo.svncopyright-cache |
1421 |
14 Dec 11 |
peter |
58 |
$mkdir_p toy_project/empty/.svndigest |
1421 |
14 Dec 11 |
peter |
59 |
echo dummie > toy_project/empty/.svndigest/foo.svncopyright-cache |
1421 |
14 Dec 11 |
peter |
60 |
$mkdir_p toy_project/dir_to_be_ignored/.svndigest |
1421 |
14 Dec 11 |
peter |
61 |
echo dummie > toy_project/dir_to_be_ignored/.svndigest/foo.svncopyright-cache |
1421 |
14 Dec 11 |
peter |
62 |
|
1438 |
20 Dec 11 |
peter |
63 |
SVNCOPYRIGHT_run 0 --root toy_project |
1423 |
16 Dec 11 |
peter |
64 |
test -r toy_project/bin/.svndigest/svnstat.cc.svncopyright-cache || exit_fail |
1421 |
14 Dec 11 |
peter |
65 |
test -e toy_project/bin/.svndigest/foo.svncopyright-cache && exit_fail |
1421 |
14 Dec 11 |
peter |
66 |
test -e toy_project/empty/.svndigest/foo.svncopyright-cache && exit_fail |
1421 |
14 Dec 11 |
peter |
67 |
test -e toy_project/dir_to_be_ignored/.svndigest/foo.svncopyright-cache \ |
1421 |
14 Dec 11 |
peter |
68 |
&& exit_fail |
1421 |
14 Dec 11 |
peter |
69 |
test -e toy_project/empty/.svndigest && exit_fail |
1423 |
16 Dec 11 |
peter |
70 |
test -e toy_project/dir_to_be_ignored/.svndigest || exit_fail |
1421 |
14 Dec 11 |
peter |
71 |
|
1421 |
14 Dec 11 |
peter |
72 |
exit_success |