Skip to content

Commit

Permalink
Trying to fix file utils unit test on Windows - cannot remove file wh…
Browse files Browse the repository at this point in the history
…en still open?
  • Loading branch information
Matthias Koefferlein committed Nov 1, 2023
1 parent 2d2b0f3 commit a6a9588
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/tl/unit_tests/tlFileUtilsTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,10 @@ TEST (21)
os << "A test";
os.close ();

tl::InputStream is (p);
EXPECT_EQ (is.read_all (), "A test");
{
tl::InputStream is (p);
EXPECT_EQ (is.read_all (), "A test");
}

EXPECT_EQ (tl::rm_file (p), true);
EXPECT_EQ (tl::file_exists (p), false);
Expand Down Expand Up @@ -925,8 +927,10 @@ TEST (23)
os << "A test";
os.close ();

tl::InputStream is (tl::combine_path (p, "test"));
EXPECT_EQ (is.read_all (), "A test");
{
tl::InputStream is (tl::combine_path (p, "test"));
EXPECT_EQ (is.read_all (), "A test");
}

EXPECT_EQ (tl::rm_dir_recursive (p), true);
EXPECT_EQ (tl::file_exists (p), false);
Expand Down

0 comments on commit a6a9588

Please sign in to comment.