mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
"Undo" delete.
This commit is contained in:
@ -284,9 +284,11 @@ TEST(FileTest, CloseError) {
|
|||||||
message + "\n");
|
message + "\n");
|
||||||
EXPECT_EQ(message, error.what());
|
EXPECT_EQ(message, error.what());
|
||||||
#else
|
#else
|
||||||
|
File other(".travis.yml", File::RDONLY);
|
||||||
close(f->descriptor());
|
close(f->descriptor());
|
||||||
// Closing file twice causes death on Windows.
|
// Closing file twice causes death on Windows.
|
||||||
EXPECT_DEATH(f->close(), "");
|
EXPECT_DEATH(f->close(), "");
|
||||||
|
other.dup2(f->descriptor()); // "undo" close or delete will fail
|
||||||
delete f;
|
delete f;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user