File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -152,4 +152,28 @@ BOOST_AUTO_TEST_CASE(rename)
152152 fs::remove (path2);
153153}
154154
155+ #ifndef WIN32
156+ BOOST_AUTO_TEST_CASE (create_directories)
157+ {
158+ // Test fs::create_directories workaround.
159+ const fs::path tmpfolder{m_args.GetDataDirBase ()};
160+
161+ const fs::path dir{GetUniquePath (tmpfolder)};
162+ fs::create_directory (dir);
163+ BOOST_CHECK (fs::exists (dir));
164+ BOOST_CHECK (fs::is_directory (dir));
165+ BOOST_CHECK (!fs::create_directories (dir));
166+
167+ const fs::path symlink{GetUniquePath (tmpfolder)};
168+ fs::create_directory_symlink (dir, symlink);
169+ BOOST_CHECK (fs::exists (symlink));
170+ BOOST_CHECK (fs::is_symlink (symlink));
171+ BOOST_CHECK (fs::is_directory (symlink));
172+ BOOST_CHECK (!fs::create_directories (symlink));
173+
174+ fs::remove (symlink);
175+ fs::remove (dir);
176+ }
177+ #endif // WIN32
178+
155179BOOST_AUTO_TEST_SUITE_END ()
You can’t perform that action at this time.
0 commit comments