From ec26b753a253bf92ad7451b685b95cbddcb75403 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:28:07 +0200 Subject: descriptions: fix bad json output (#11350) --------- Co-authored-by: Mihai Fufezan --- hyprtester/src/tests/main/hyprctl.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 hyprtester/src/tests/main/hyprctl.cpp (limited to 'hyprtester/src/tests/main/hyprctl.cpp') 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 +#include +#include +#include +#include +#include +#include +#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); -- cgit v1.2.3