source: trunk/test/error_test.sh @ 1220

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

closes #480. Quote files with 'file' (same style as subversion). Add a test to check output of some failures and use variable GREP rather than hardcoding grep.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1#!/bin/sh
2
3# $Id: error_test.sh 1220 2010-10-13 04:10:52Z peter $
4
5# Copyright (C) 2010 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
41SVNCOPYRIGHT_run 1 --root .
42$GREP "svncopyright: '.*' is not a working copy" stderr || exit_fail
43
44
45
46exit_success;
Note: See TracBrowser for help on using the repository browser.