diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-06-26 19:43:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-26 19:43:39 +0200 |
| commit | 3d6476c9021519995239ec93bbb11f0dce6c60a0 (patch) | |
| tree | 381edc199f4348e4bb42863b55d47a01e4f550ab /hyprtester/src/tests/plugin/plugin.cpp | |
| parent | 9a67e0421b49596060719566996ee4ca81ae8843 (diff) | |
Core: Add a test suite (#9297)
Adds a test suite for testing hyprland's features with a runtime tester
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Diffstat (limited to 'hyprtester/src/tests/plugin/plugin.cpp')
| -rw-r--r-- | hyprtester/src/tests/plugin/plugin.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/hyprtester/src/tests/plugin/plugin.cpp b/hyprtester/src/tests/plugin/plugin.cpp new file mode 100644 index 00000000..94470d6f --- /dev/null +++ b/hyprtester/src/tests/plugin/plugin.cpp @@ -0,0 +1,21 @@ +#include "plugin.hpp" +#include "../../shared.hpp" +#include "../../hyprctlCompat.hpp" +#include <print> +#include <thread> +#include <chrono> +#include <hyprutils/os/Process.hpp> +#include <hyprutils/memory/WeakPtr.hpp> +#include <csignal> +#include <cerrno> +#include "../shared.hpp" + +bool testPlugin() { + const auto RESPONSE = getFromSocket("/dispatch plugin:test:test"); + + if (RESPONSE != "ok") { + NLog::log("{}Plugin tests failed, plugin returned:\n{}{}", Colors::RED, Colors::RESET, RESPONSE); + return false; + } + return true; +} |
