Commit ba89c639 authored by Victor Zverovich's avatar Victor Zverovich

"Undo" delete.

parent 798c0fae
......@@ -284,9 +284,11 @@ TEST(FileTest, CloseError) {
message + "\n");
EXPECT_EQ(message, error.what());
#else
File other(".travis.yml", File::RDONLY);
close(f->descriptor());
// Closing file twice causes death on Windows.
EXPECT_DEATH(f->close(), "");
other.dup2(f->descriptor()); // "undo" close or delete will fail
delete f;
#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