1220 |
13 Oct 10 |
peter |
#!/bin/sh |
1220 |
13 Oct 10 |
peter |
2 |
|
1220 |
13 Oct 10 |
peter |
# $Id$ |
1220 |
13 Oct 10 |
peter |
4 |
|
1532 |
05 Oct 12 |
peter |
# Copyright (C) 2010, 2011, 2012 Peter Johansson |
1220 |
13 Oct 10 |
peter |
6 |
# |
1220 |
13 Oct 10 |
peter |
# This file is part of svndigest, http://dev.thep.lu.se/svndigest |
1220 |
13 Oct 10 |
peter |
8 |
# |
1220 |
13 Oct 10 |
peter |
# svndigest is free software; you can redistribute it and/or modify it |
1220 |
13 Oct 10 |
peter |
# under the terms of the GNU General Public License as published by |
1220 |
13 Oct 10 |
peter |
# the Free Software Foundation; either version 3 of the License, or |
1220 |
13 Oct 10 |
peter |
# (at your option) any later version. |
1220 |
13 Oct 10 |
peter |
13 |
# |
1220 |
13 Oct 10 |
peter |
# svndigest is distributed in the hope that it will be useful, but |
1220 |
13 Oct 10 |
peter |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
1220 |
13 Oct 10 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1220 |
13 Oct 10 |
peter |
# General Public License for more details. |
1220 |
13 Oct 10 |
peter |
18 |
# |
1220 |
13 Oct 10 |
peter |
# You should have received a copy of the GNU General Public License |
1220 |
13 Oct 10 |
peter |
# along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
1220 |
13 Oct 10 |
peter |
21 |
|
1220 |
13 Oct 10 |
peter |
# testing the output and return value of some expected failures |
1220 |
13 Oct 10 |
peter |
23 |
|
1220 |
13 Oct 10 |
peter |
24 |
required= |
1220 |
13 Oct 10 |
peter |
25 |
|
1525 |
01 Oct 12 |
peter |
26 |
. test/init.sh || exit 99 |
1220 |
13 Oct 10 |
peter |
27 |
|
1220 |
13 Oct 10 |
peter |
# exit if cmd fails |
1220 |
13 Oct 10 |
peter |
29 |
set -e |
1220 |
13 Oct 10 |
peter |
30 |
|
1220 |
13 Oct 10 |
peter |
31 |
SVNDIGEST_run 1 --root ${abs_top_srcdir}/README |
1220 |
13 Oct 10 |
peter |
32 |
$GREP 'svndigest:' stderr || exit_fail |
1220 |
13 Oct 10 |
peter |
33 |
$GREP "'${abs_top_srcdir}/README': " stderr || exit_fail |
1220 |
13 Oct 10 |
peter |
34 |
|
1220 |
13 Oct 10 |
peter |
35 |
SVNCOPYRIGHT_run 1 --root ${abs_top_srcdir}/README |
1220 |
13 Oct 10 |
peter |
36 |
$GREP 'svncopyright:' stderr || exit_fail |
1220 |
13 Oct 10 |
peter |
37 |
$GREP "'${abs_top_srcdir}/README': " stderr || exit_fail |
1373 |
10 Jun 11 |
peter |
38 |
$GREP "Unknown error" stderr && exit_fail |
1220 |
13 Oct 10 |
peter |
39 |
|
1220 |
13 Oct 10 |
peter |
40 |
SVNDIGEST_run 1 --root . |
1610 |
11 Feb 23 |
peter |
41 |
$GREP "svndigest: .* is not a working copy" stderr || exit_fail |
1610 |
11 Feb 23 |
peter |
42 |
$GREP "svndigest: .* is not a working copy.*is not a working copy" stderr \ |
1373 |
10 Jun 11 |
peter |
43 |
&& exit_fail |
1220 |
13 Oct 10 |
peter |
44 |
SVNCOPYRIGHT_run 1 --root . |
1610 |
11 Feb 23 |
peter |
45 |
$GREP "svncopyright: .* is not a working copy" stderr || exit_fail |
1610 |
11 Feb 23 |
peter |
46 |
$GREP "svncopyright: .* is not a working copy.*is not a working copy" stderr\ |
1373 |
10 Jun 11 |
peter |
47 |
&& exit_fail |
1220 |
13 Oct 10 |
peter |
48 |
|
1242 |
24 Oct 10 |
peter |
49 |
SVNDIGEST_run 1 --rapakalja |
1242 |
24 Oct 10 |
peter |
50 |
$GREP "svndigest: unrecognized option.*rapakalja" stderr || exit_fail |
1220 |
13 Oct 10 |
peter |
51 |
|
1242 |
24 Oct 10 |
peter |
52 |
SVNCOPYRIGHT_run 1 --rapakalja |
1242 |
24 Oct 10 |
peter |
53 |
$GREP "svncopyright: unrecognized option.*rapakalja" stderr || exit_fail |
1220 |
13 Oct 10 |
peter |
54 |
|
1610 |
11 Feb 23 |
peter |
55 |
exit_success; |