hyprutils/tests/os.cpp

18 lines
407 B
C++
Raw Permalink Normal View History

2024-10-14 23:26:41 +02:00
#include <hyprutils/os/Process.hpp>
#include "shared.hpp"
using namespace Hyprutils::OS;
int main(int argc, char** argv, char** envp) {
int ret = 0;
CProcess process("echo", {"Hello World!"});
EXPECT(process.runAsync(), true);
EXPECT(process.runSync(), true);
EXPECT(process.stdOut(), std::string{"Hello World!\n"});
EXPECT(process.stdErr(), std::string{""});
return ret;
}