1555 |
05 Nov 12 |
peter |
// $Id$ |
1555 |
05 Nov 12 |
peter |
2 |
|
1555 |
05 Nov 12 |
peter |
3 |
/* |
1635 |
30 Mar 23 |
peter |
Copyright (C) 2012, 2023 Peter Johansson |
1555 |
05 Nov 12 |
peter |
5 |
|
1555 |
05 Nov 12 |
peter |
This file is part of svndigest, http://dev.thep.lu.se/svndigest |
1555 |
05 Nov 12 |
peter |
7 |
|
1555 |
05 Nov 12 |
peter |
svndigest is free software; you can redistribute it and/or modify it |
1555 |
05 Nov 12 |
peter |
under the terms of the GNU General Public License as published by |
1555 |
05 Nov 12 |
peter |
the Free Software Foundation; either version 3 of the License, or |
1555 |
05 Nov 12 |
peter |
(at your option) any later version. |
1555 |
05 Nov 12 |
peter |
12 |
|
1555 |
05 Nov 12 |
peter |
svndigest is distributed in the hope that it will be useful, but |
1555 |
05 Nov 12 |
peter |
WITHOUT ANY WARRANTY; without even the implied warranty of |
1555 |
05 Nov 12 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1555 |
05 Nov 12 |
peter |
General Public License for more details. |
1555 |
05 Nov 12 |
peter |
17 |
|
1555 |
05 Nov 12 |
peter |
You should have received a copy of the GNU General Public License |
1555 |
05 Nov 12 |
peter |
along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
1555 |
05 Nov 12 |
peter |
20 |
*/ |
1555 |
05 Nov 12 |
peter |
21 |
|
1555 |
05 Nov 12 |
peter |
// test that SVNcat follows copy |
1555 |
05 Nov 12 |
peter |
23 |
|
1619 |
12 Mar 23 |
peter |
24 |
#include <config.h> |
1619 |
12 Mar 23 |
peter |
25 |
|
1555 |
05 Nov 12 |
peter |
26 |
#include "Suite.h" |
1555 |
05 Nov 12 |
peter |
27 |
|
1555 |
05 Nov 12 |
peter |
28 |
#include "lib/SVN.h" |
1555 |
05 Nov 12 |
peter |
29 |
#include "lib/SVNcat.h" |
1555 |
05 Nov 12 |
peter |
30 |
|
1555 |
05 Nov 12 |
peter |
31 |
#include <ostream> |
1555 |
05 Nov 12 |
peter |
32 |
#include <string> |
1555 |
05 Nov 12 |
peter |
33 |
|
1555 |
05 Nov 12 |
peter |
34 |
using namespace theplu::svndigest; |
1555 |
05 Nov 12 |
peter |
35 |
|
1555 |
05 Nov 12 |
peter |
36 |
int main(int argc, char* argv[]) |
1555 |
05 Nov 12 |
peter |
37 |
{ |
1555 |
05 Nov 12 |
peter |
38 |
test::Suite suite(argc, argv, true); |
1555 |
05 Nov 12 |
peter |
39 |
SVN* svn=SVN::instance("toy_project"); |
1555 |
05 Nov 12 |
peter |
40 |
if (!svn) { |
1555 |
05 Nov 12 |
peter |
41 |
suite.out() << "error: cannot create SVN instance\n"; |
1555 |
05 Nov 12 |
peter |
42 |
return EXIT_FAILURE; |
1555 |
05 Nov 12 |
peter |
43 |
} |
1555 |
05 Nov 12 |
peter |
44 |
|
1555 |
05 Nov 12 |
peter |
45 |
SVNcat readme("toy_project/late_copy/Node.h", 5); |
1555 |
05 Nov 12 |
peter |
46 |
suite.out() << readme.str().size() << " characters\n"; |
1555 |
05 Nov 12 |
peter |
47 |
if (readme.str().empty()) { |
1555 |
05 Nov 12 |
peter |
48 |
suite.out() << "error expected non empty string\n"; |
1555 |
05 Nov 12 |
peter |
49 |
suite.add(false); |
1555 |
05 Nov 12 |
peter |
50 |
} |
1555 |
05 Nov 12 |
peter |
51 |
return suite.exit_status(); |
1555 |
05 Nov 12 |
peter |
52 |
} |
1555 |
05 Nov 12 |
peter |
53 |
|