summaryrefslogtreecommitdiff
path: root/hyprtester/src/tests/plugin/plugin.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-06-26 19:43:39 +0200
committerGitHub <noreply@github.com>2025-06-26 19:43:39 +0200
commit3d6476c9021519995239ec93bbb11f0dce6c60a0 (patch)
tree381edc199f4348e4bb42863b55d47a01e4f550ab /hyprtester/src/tests/plugin/plugin.cpp
parent9a67e0421b49596060719566996ee4ca81ae8843 (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.cpp21
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;
+}