source: trunk/test/remove_cache_test.sh @ 1525

Last change on this file since 1525 was 1525, checked in by Peter Johansson, 9 years ago

replace recursive Makefile with one single Makefile. Keeping multiple Makefile.ams which are included into main Makefile.am.

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