mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-02-02 03:38:43 -05:00
17 lines
360 B
C++
17 lines
360 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "Process.h"
|
|
|
|
TEST(ProcessTest, Abort) {
|
|
EXPECT_EXIT(g_process.shutdownAbort(), ::testing::KilledBySignal(SIGABRT), "");
|
|
|
|
// verify file is created
|
|
struct stat buffer;
|
|
EXPECT_TRUE(stat(Process::getAbortFileName(), &buffer) == 0);
|
|
|
|
// remove file
|
|
unlink(Process::getAbortFileName());
|
|
|
|
/// @todo ALC verify/remove core
|
|
}
|