Commit ba89c639 authored by Victor Zverovich's avatar Victor Zverovich

"Undo" delete.

parent 798c0fae
...@@ -284,9 +284,11 @@ TEST(FileTest, CloseError) { ...@@ -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
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment