2024-06-09 15:18:42 +00:00
|
|
|
#include "modules/hyprland/backend.hpp"
|
|
|
|
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
namespace hyprland = waybar::modules::hyprland;
|
|
|
|
|
|
|
|
class IPCTestFixture : public hyprland::IPC {
|
|
|
|
public:
|
|
|
|
IPCTestFixture() : IPC() { IPC::socketFolder_ = ""; }
|
|
|
|
~IPCTestFixture() { fs::remove_all(tempDir); }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
const char* instanceSig = "instance_sig";
|
|
|
|
fs::path tempDir = fs::temp_directory_path() / "hypr_test";
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
2024-06-28 18:11:50 +00:00
|
|
|
|
|
|
|
class IPCMock : public IPCTestFixture {
|
|
|
|
public:
|
|
|
|
// Mock getSocket1Reply to return an empty string
|
|
|
|
static std::string getSocket1Reply(const std::string& rq) { return ""; }
|
2024-07-16 19:53:54 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
const char* instanceSig = "instance_sig";
|
2024-06-28 18:11:50 +00:00
|
|
|
};
|