|
GnuCash 2.4.99
|
00001 #include "config.h" 00002 #include <stdio.h> 00003 #include <stdlib.h> 00004 #include <libguile.h> 00005 00006 #include "gnc-module.h" 00007 #include <unittest-support.h> 00008 00009 static void 00010 guile_main(void *closure, int argc, char ** argv) 00011 { 00012 GNCModule foo; 00013 gchar *msg = "Module '../../../src/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n"; 00014 gchar *logdomain = "gnc.module"; 00015 guint loglevel = G_LOG_LEVEL_WARNING; 00016 TestErrorStruct check = { loglevel, logdomain, msg }; 00017 g_log_set_handler (logdomain, loglevel, 00018 (GLogFunc)test_checked_handler, &check); 00019 g_test_message(" test-agedver.c: asking for an old but supported interface ..."); 00020 00021 gnc_module_system_init(); 00022 00023 foo = gnc_module_load("gnucash/agedver", 5); 00024 00025 if (foo) 00026 { 00027 printf(" ok\n"); 00028 exit(0); 00029 } 00030 else 00031 { 00032 printf(" failed\n"); 00033 exit(-1); 00034 } 00035 } 00036 00037 int 00038 main(int argc, char ** argv) 00039 { 00040 scm_boot_guile(argc, argv, guile_main, NULL); 00041 return 0; 00042 }
1.7.4