source: branches/0.9-stable/test/error_test.sh @ 1334

Last change on this file since 1334 was 1334, checked in by Peter Johansson, 11 years ago

fixes #491

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1#!/bin/sh
2
3# $Id: error_test.sh 1334 2011-01-28 01:17:28Z peter $
4
5# Copyright (C) 2010, 2011 Peter Johansson
6#
7# This file is part of svndigest, http://dev.thep.lu.se/svndigest
8#
9# svndigest is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version.
13#
14# svndigest is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with svndigest. If not, see <http://www.gnu.org/licenses/>.
21
22# testing the output and return value of some expected failures
23
24required=
25
26. ./init.sh || exit 1
27
28# exit if cmd fails
29set -e
30
31SVNDIGEST_run 1 --root ${abs_top_srcdir}/README
32$GREP 'svndigest:' stderr || exit_fail
33$GREP "'${abs_top_srcdir}/README': " stderr || exit_fail
34
35SVNCOPYRIGHT_run 1 --root ${abs_top_srcdir}/README
36$GREP 'svncopyright:' stderr || exit_fail
37$GREP "'${abs_top_srcdir}/README': " stderr || exit_fail
38
39SVNDIGEST_run 1 --root .
40$GREP "svndigest: '.*' is not a working copy" stderr || exit_fail
41$GREP "svndigest: '.*' is not a working copy.*is not a working copy" stderr\
42 && exit_fail
43SVNCOPYRIGHT_run 1 --root .
44$GREP "svncopyright: '.*' is not a working copy" stderr || exit_fail
45$GREP "svncopyright: '.*' is not a working copy.*is not a working copy" stderr\
46 && exit_fail
47
48SVNDIGEST_run 1 --rapakalja
49$GREP "svndigest: unrecognized option.*rapakalja" stderr || exit_fail
50
51SVNCOPYRIGHT_run 1 --rapakalja
52$GREP "svncopyright: unrecognized option.*rapakalja" stderr || exit_fail
53
54exit_success;
Note: See TracBrowser for help on using the repository browser.