GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
test-app-utils.c
1 /********************************************************************
2  * test-app-utils.c: GLib g_test test execution file. *
3  * Copyright 2013 John Ralls <[email protected]> *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA [email protected] *
21 \********************************************************************/
22 
23 #include <config.h>
24 #include <glib.h>
25 #include <qof.h>
26 #include <libguile.h>
27 #include <gnc-module.h>
28 
29 extern void test_suite_option_util (void);
30 
31 static void
32 guile_main (void *closure, int argc, char **argv)
33 {
34  GNCModule mod;
35  int retval;
36  gnc_module_system_init ();
37  mod = gnc_module_load ("gnucash/app-utils", 0);
38 
39  test_suite_option_util ();
40  retval = g_test_run ();
41 
42  exit (retval);
43 }
44 
45 int
46 main (int argc, char *argv[])
47 {
48  qof_init (); /* Initialize the GObject system */
49  qof_log_init_filename_special ("stderr"); /* Init the log system */
50  g_test_init (&argc, &argv, NULL); /* initialize test program */
51  //qof_log_set_level("gnc", G_LOG_LEVEL_DEBUG);
52  g_test_bug_base("https://bugzilla.gnome.org/show_bug.cgi?id="); /* init the bugzilla URL */
53  g_setenv ("GNC_UNINSTALLED", "1", TRUE);
54  scm_boot_guile (argc, argv, guile_main, NULL);
55  return 0;
56 }
void qof_log_init_filename_special(const char *log_to_filename)
void qof_init(void)
Initialise the Query Object Framework.