let the plugin test test the new config interface
This commit is contained in:
parent
6169ccaf08
commit
221a2a76c3
3 changed files with 17 additions and 1 deletions
|
|
@ -27,6 +27,8 @@ return: 0
|
|||
END
|
||||
|
||||
TEST "C plugin test, nested" plugin_examplepluginc_nested <<END
|
||||
out: config path is: ./
|
||||
out: plugin path is: .libs
|
||||
out: Hallo Welt!
|
||||
out: Hello World!
|
||||
out: Bye World!
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "hello_interface.h"
|
||||
#include "lumiera/interfacedescriptor.h"
|
||||
#include "lumiera/config_interface.h"
|
||||
|
||||
LUMIERA_PLUGIN_INTERFACEHANDLE;
|
||||
|
||||
|
|
@ -49,12 +50,22 @@ void yeahbabe (void)
|
|||
LUMIERA_INTERFACE_HANDLE (lumieraorg_testhello, 0) english =
|
||||
LUMIERA_INTERFACE_OPEN (lumieraorg_testhello, 0, 0, lumieraorg_hello_english);
|
||||
|
||||
LUMIERA_INTERFACE_HANDLE (lumieraorg_configuration, 0) config =
|
||||
LUMIERA_INTERFACE_OPEN (lumieraorg_configuration, 0, 0, lumieraorg_configuration);
|
||||
|
||||
const char* path;
|
||||
if (config->wordlist_get ("config.path", &path))
|
||||
printf ("config path is: %s\n", path);
|
||||
if (config->wordlist_get ("plugin.path", &path))
|
||||
printf ("plugin path is: %s\n", path);
|
||||
|
||||
LUMIERA_INTERFACE_CLOSE (config);
|
||||
|
||||
german->hello ();
|
||||
english->hello ();
|
||||
english->goodbye ("World!");
|
||||
german->goodbye ("Welt!");
|
||||
|
||||
|
||||
LUMIERA_INTERFACE_CLOSE (german);
|
||||
LUMIERA_INTERFACE_CLOSE (english);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include "lumiera/interfaceregistry.h"
|
||||
#include "lumiera/interfacedescriptor.h"
|
||||
#include "lumiera/config.h"
|
||||
#include "lumiera/config_interface.h"
|
||||
|
||||
#include "tests/test.h"
|
||||
#include "tests/lumiera/hello_interface.h"
|
||||
|
|
@ -524,6 +525,7 @@ TEST ("plugin_examplepluginc_nested")
|
|||
lumiera_config_init ("./");
|
||||
lumiera_interfaceregistry_init ();
|
||||
lumiera_plugin_discover (lumiera_plugin_load, lumiera_plugin_register);
|
||||
lumiera_config_interface_init ();
|
||||
|
||||
LUMIERA_INTERFACE_HANDLE(lumieraorg_testtest, 0) test =
|
||||
LUMIERA_INTERFACE_OPEN (lumieraorg_testtest, 0, 0, lumieraorg_test_both);
|
||||
|
|
@ -532,6 +534,7 @@ TEST ("plugin_examplepluginc_nested")
|
|||
|
||||
LUMIERA_INTERFACE_CLOSE (test);
|
||||
|
||||
lumiera_config_interface_destroy ();
|
||||
lumiera_interfaceregistry_destroy ();
|
||||
lumiera_config_destroy ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue