encfs/test/os-utils-test.h
Valient Gough 59d74aea1f Squashed 'vendor/github.com/muflihun/easyloggingpp/' content from commit 850ea2a9
git-subtree-dir: vendor/github.com/muflihun/easyloggingpp
git-subtree-split: 850ea2a9f151ed648a989dda1cf44e503e45831f
2017-08-05 23:23:41 -07:00

19 lines
456 B
C++

#ifndef OS_UTILS_TEST_H
#define OS_UTILS_TEST_H
#include "test.h"
#if ELPP_OS_UNIX
TEST(OSUtilsTest, GetBashOutput) {
const char* bashCommand = "echo 'test'";
std::string bashResult = OS::getBashOutput(bashCommand);
EXPECT_EQ("test", bashResult);
}
#endif
TEST(OSUtilsTest, GetEnvironmentVariable) {
std::string variable = OS::getEnvironmentVariable("PATH", "pathResult");
EXPECT_FALSE(variable.empty());
}
#endif // OS_UTILS_TEST_H