mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-30 07:52:08 +00:00
Add test to detect premature close of Handle
[SVN r380]
This commit is contained in:
@@ -120,6 +120,14 @@ int test_main( int, char * [] )
|
||||
BOOST_TEST( !fs::is_directory( file_ph ) );
|
||||
verify_file( file_ph, "foobar1" );
|
||||
|
||||
// there was an inital bug in directory_iterator that caused premature
|
||||
// close of an OS handle. The next five lines will detect regression.
|
||||
{
|
||||
fs::directory_iterator di;
|
||||
{ di = fs::directory_iterator( dir ); }
|
||||
BOOST_TEST( ++di != fs::directory_iterator() );
|
||||
}
|
||||
|
||||
// copy_file() tests
|
||||
fs::copy_file( file_ph, d1 << "f2" );
|
||||
BOOST_TEST( fs::exists( file_ph ) );
|
||||
|
||||
Reference in New Issue
Block a user