diff options
Diffstat (limited to 'hyprtester/src/tests/main/hyprctl.cpp')
| -rw-r--r-- | hyprtester/src/tests/main/hyprctl.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/hyprtester/src/tests/main/hyprctl.cpp b/hyprtester/src/tests/main/hyprctl.cpp new file mode 100644 index 00000000..c16b0d97 --- /dev/null +++ b/hyprtester/src/tests/main/hyprctl.cpp @@ -0,0 +1,35 @@ +#include "tests.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" + +static int ret = 0; + +using namespace Hyprutils::OS; +using namespace Hyprutils::Memory; + +#define UP CUniquePointer +#define SP CSharedPointer + +static bool test() { + NLog::log("{}Testing hyprctl", Colors::GREEN); + + { + NLog::log("{}Testing hyprctl descriptions for any json errors", Colors::GREEN); + CProcess jqProc("bash", {"-c", "hyprctl descriptions | jq"}); + jqProc.addEnv("HYPRLAND_INSTANCE_SIGNATURE", HIS); + jqProc.runSync(); + EXPECT(jqProc.exitCode(), 0); + } + + return !ret; +} + +REGISTER_TEST_FN(test); |
