mirror of
https://github.com/hyprwm/hyprutils.git
synced 2024-12-22 15:29:49 +01:00
19 lines
No EOL
459 B
C++
19 lines
No EOL
459 B
C++
#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("sh", {"-c", "echo \"Hello $WORLD!\""});
|
|
process.addEnv("WORLD", "World");
|
|
|
|
EXPECT(process.runAsync(), true);
|
|
EXPECT(process.runSync(), true);
|
|
|
|
EXPECT(process.stdOut(), std::string{"Hello World!\n"});
|
|
EXPECT(process.stdErr(), std::string{""});
|
|
|
|
return ret;
|
|
} |