mirror of
https://github.com/falk-werner/webfuse
synced 2026-10-17 09:03:02 +00:00
sepated unit and integration tests
This commit is contained in:
23
test-src/integration/webfuse/test/tempdir.cpp
Normal file
23
test-src/integration/webfuse/test/tempdir.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "webfuse/test/tempdir.hpp"
|
||||
#include <unistd.h>
|
||||
|
||||
namespace webfuse
|
||||
{
|
||||
|
||||
tempdir::tempdir()
|
||||
{
|
||||
char path_template[] = "/tmp/webfuse_test_XXXXXX";
|
||||
path = mkdtemp(path_template);
|
||||
}
|
||||
|
||||
tempdir::~tempdir()
|
||||
{
|
||||
unlink(path.c_str());
|
||||
}
|
||||
|
||||
std::string const & tempdir::name() const
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user