encfs/test/plog-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
481 B
C++

#ifndef PLOG_TEST_H
#define PLOG_TEST_H
#include "test.h"
TEST(PLogTest, WriteLog) {
std::fstream file("/tmp/a/file/that/does/not/exist.txt", std::fstream::in);
if (file.is_open()) {
// We dont expect to open file
FAIL();
}
PLOG(INFO) << "This is plog";
std::string expected = BUILD_STR(getDate() << " This is plog: No such file or directory [2]\n");
std::string actual = tail(1);
EXPECT_EQ(expected, actual);
}
#endif // PLOG_TEST_H