Leaf: Specify keyset outside of macro
@@ -22,7 +22,6 @@ using CppKey = kdb::Key;
#define OPEN_PLUGIN(parentName, filepath) \
CppKeySet modules{ 0, KS_END }; \
CppKeySet config{ 0, KS_END }; \
- CppKeySet keys{ 0, KS_END }; \
elektraModulesInit (modules.getKeySet (), 0); \
CppKey parent{ parentName, KEY_VALUE, filepath, KEY_END }; \
Plugin * plugin = elektraPluginOpen ("leaf", modules.getKeySet (), config.getKeySet (), *parent); \
@@ -40,6 +39,7 @@ TEST (leaf, basics)
{
OPEN_PLUGIN ("system/elektra/modules/leaf", "")
+ CppKeySet keys{ 0, KS_END };
succeed_if_same (plugin->kdbGet (plugin, keys.getKeySet (), *parent), ELEKTRA_PLUGIN_STATUS_SUCCESS,
"Unable to retrieve plugin contract");
succeed_if_same (plugin->kdbSet (plugin, keys.getKeySet (), *parent), ELEKTRA_PLUGIN_STATUS_NO_UPDATE, "Call of `kdbSet` failed");
