mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
tests: Add infrastructure for testing plugins (#1538)
This PR adds a test architecture to be able to test plugins Main infrastructure done by @WerWolv --------- Co-authored-by: WerWolv <werwolv98@gmail.com>
This commit is contained in:
16
tests/plugins/source/plugins.cpp
Normal file
16
tests/plugins/source/plugins.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <hex/api/plugin_manager.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
using namespace hex;
|
||||
class PluginLoader {
|
||||
public:
|
||||
PluginLoader() {
|
||||
for (const auto &dir : fs::getDefaultPaths(fs::ImHexPath::Plugins)) {
|
||||
PluginManager::addLoadPath(dir);
|
||||
}
|
||||
|
||||
PluginManager::load();
|
||||
}
|
||||
};
|
||||
static PluginLoader pluginLoader;
|
||||
Reference in New Issue
Block a user