2005-11-02 03:32:36 +00:00
|
|
|
/***************************************************************************
|
|
|
|
|
* test-load-backend.c
|
|
|
|
|
*
|
|
|
|
|
* Replaces the guile version to test the GModule file backend loading.
|
|
|
|
|
*
|
|
|
|
|
* Sun Oct 9 18:58:47 2005
|
|
|
|
|
* Copyright 2005 Neil Williams
|
|
|
|
|
* linux@codehelp.co.uk
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-11-17 05:35:02 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
|
* 02110-1301, USA.
|
2005-11-02 03:32:36 +00:00
|
|
|
*/
|
2015-11-29 17:11:29 -08:00
|
|
|
extern "C"
|
|
|
|
|
{
|
2017-10-26 11:14:21 +02:00
|
|
|
#include <config.h>
|
2005-11-02 03:32:36 +00:00
|
|
|
#include "qof.h"
|
|
|
|
|
#include "cashobjects.h"
|
|
|
|
|
#include "test-stuff.h"
|
2015-11-29 17:11:29 -08:00
|
|
|
}
|
2005-11-02 03:32:36 +00:00
|
|
|
|
2008-08-01 16:02:07 +00:00
|
|
|
#define GNC_LIB_NAME "gncmod-backend-xml"
|
2017-08-07 11:37:53 +02:00
|
|
|
#define GNC_LIB_REL_PATH "xml"
|
2005-11-02 03:32:36 +00:00
|
|
|
|
2016-03-12 14:04:40 -08:00
|
|
|
int main (int argc, char** argv)
|
2005-11-02 03:32:36 +00:00
|
|
|
{
|
2017-08-07 11:37:53 +02:00
|
|
|
g_setenv ("GNC_UNINSTALLED", "1", TRUE);
|
2016-03-12 14:04:40 -08:00
|
|
|
qof_init ();
|
|
|
|
|
cashobjects_register ();
|
|
|
|
|
do_test (
|
2017-08-07 11:37:53 +02:00
|
|
|
qof_load_backend_library (GNC_LIB_REL_PATH, GNC_LIB_NAME),
|
2008-08-01 16:02:07 +00:00
|
|
|
" loading gnc-backend-xml GModule failed");
|
2016-03-12 14:04:40 -08:00
|
|
|
print_test_results ();
|
|
|
|
|
qof_close ();
|
|
|
|
|
exit (get_rv ());
|
2005-11-02 03:32:36 +00:00
|
|
|
}
|