2
// mgui/tests/test_author.cpp
3
// This file is part of Bombono DVD project.
5
// Copyright (c) 2009-2010 Ilya Murav'jov
7
// This program is free software; you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License as published by
9
// the Free Software Foundation; either version 2 of the License, or
10
// (at your option) any later version.
12
// This program is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
17
// You should have received a copy of the GNU General Public License
18
// along with this program; if not, write to the Free Software
19
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
#include <mgui/tests/_pc_.h>
24
#include "test_author.h"
25
#include "test_mbrowser.h"
27
#include <mgui/init.h>
28
#include <mgui/author/script.h>
30
#include <boost/filesystem/convenience.hpp> // fs::create_directories()
35
bool AuthorDVDTest(const std::string& dir)
37
fs::create_directories(dir);
39
BOOST_CHECK( ClearAllFiles(dir, err_str) );
41
return Author::IsGood(AuthorDVD(dir));
45
static void TestAuthoringEx(const std::string& prj_fname, const std::string& out_dir)
48
InitAndLoadPrj(prj_fname);
50
Execution::ConsoleMode cam;
51
BOOST_CHECK( AuthorDVDTest(out_dir) );
54
// неинтерактивный вариант авторинга
55
BOOST_AUTO_TEST_CASE( TestAuthoring )
57
if( !IsTestOn("./test_author") )
59
TestAuthoringEx(TestProjectPath(), "../dvd_out");
62
// :TODO: это долгий тест, по умолчанию не включаем;
63
// реализовать декларацию функции BOOST_AUTO_TEST_CASE_LOOOONG()
67
//BOOST_AUTO_TEST_CASE( TestAuthoringRegression )
69
// TestAuthoringEx(TestProjectPath("menus-regression.xml"), "../dvd_out-regression");
72
} // namespace Project