summaryrefslogtreecommitdiff
path: root/src/third_party/boost/libs/filesystem/v2/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/boost/libs/filesystem/v2/test')
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/Jamfile.v243
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/convenience_test.cpp176
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/deprecated_test.cpp205
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/equivalent.cpp39
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/fstream_test.cpp184
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/large_file_support_test.cpp42
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/lpath.hpp101
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/common.vsprops14
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/convenience_test/convenience_test.vcproj197
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/deprecated_test/deprecated_test.vcproj197
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/filesystem-v2.sln119
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/filesystem_dll/filesystem_dll.vcproj207
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/fstream_test/fstream_test.vcproj199
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/large_file_support_test/large_file_support_test.vcproj199
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/mbcopy/mbcopy.vcproj199
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/mbpath/mbpath.vcproj195
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/operations_test/operations_test.vcproj197
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/path_test/path_test.vcproj197
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/simple_ls/simple_ls.vcproj195
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/system_dll/system_dll.vcproj193
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/msvc/wide_test/wide_test.vcproj198
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/operations_test.cpp953
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/path_test.cpp1380
-rw-r--r--src/third_party/boost/libs/filesystem/v2/test/wide_test.cpp169
24 files changed, 5798 insertions, 0 deletions
diff --git a/src/third_party/boost/libs/filesystem/v2/test/Jamfile.v2 b/src/third_party/boost/libs/filesystem/v2/test/Jamfile.v2
new file mode 100644
index 00000000000..2bb8700ebf7
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/Jamfile.v2
@@ -0,0 +1,43 @@
+# Boost Filesystem Library test Jamfile
+
+# (C) Copyright Beman Dawes 2002-2006
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
+
+project
+ : requirements
+ <library>/boost/filesystem//boost_filesystem
+ <toolset>msvc:<asynch-exceptions>on
+ ;
+
+ test-suite "filesystem" :
+ [ run path_test.cpp
+ : : : <link>static
+ ]
+ [ run path_test.cpp
+ : : : : path_test_dll
+ ]
+ [ run operations_test.cpp
+ : : : <link>static
+ ]
+ [ run operations_test.cpp
+ : : : : operations_test_dll
+ ]
+ [ run fstream_test.cpp
+ : : : <link>static
+ ]
+ [ run convenience_test.cpp
+ : : : <link>static
+ ]
+ [ run large_file_support_test.cpp
+ : : : <link>static
+ ]
+ [ run wide_test.cpp
+ : : : <link>static
+ ]
+
+ [ compile deprecated_test.cpp ]
+ [ compile ../example/mbcopy.cpp ]
+ [ compile ../example/mbpath.cpp ]
+ [ compile ../example/simple_ls.cpp ]
+ ;
diff --git a/src/third_party/boost/libs/filesystem/v2/test/convenience_test.cpp b/src/third_party/boost/libs/filesystem/v2/test/convenience_test.cpp
new file mode 100644
index 00000000000..aa920547e6c
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/convenience_test.cpp
@@ -0,0 +1,176 @@
+// libs/filesystem/test/convenience_test.cpp -------------------------------//
+
+// Copyright Beman Dawes, 2002
+// Copyright Vladimir Prus, 2002
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+#define BOOST_FILESYSTEM_VERSION 2
+
+#include <boost/config/warning_disable.hpp>
+
+// See deprecated_test for tests of deprecated features
+#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+# define BOOST_FILESYSTEM_NO_DEPRECATED
+#endif
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#include <boost/filesystem/convenience.hpp>
+namespace fs = boost::filesystem;
+using fs::path;
+namespace sys = boost::system;
+
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/detail/lightweight_main.hpp>
+
+#include <boost/bind.hpp>
+#include <fstream>
+#include <iostream>
+
+#ifndef BOOST_FILESYSTEM2_NARROW_ONLY
+# define BOOST_FS_IS_EMPTY fs::is_empty
+# define BOOST_BND(BOOST_FUNC_TO_DO) BOOST_FUNC_TO_DO<fs::path>
+#else
+# define BOOST_FS_IS_EMPTY fs::_is_empty
+# define BOOST_BND(BOOST_FUNC_TO_DO) BOOST_FUNC_TO_DO
+#endif
+
+namespace
+{
+ template< typename F >
+ bool throws_fs_error( F func )
+ {
+ try { func(); }
+
+ catch ( const fs::filesystem_error & )
+ {
+ return true;
+ }
+ return false;
+ }
+
+ void create_recursive_iterator( const fs::path & ph )
+ {
+ fs::recursive_directory_iterator it( ph );
+ }
+}
+
+// --------------------------------------------------------------------------//
+
+int cpp_main( int, char*[] )
+{
+
+// create_directories() tests ----------------------------------------------//
+
+ BOOST_TEST( !fs::create_directories( "" ) ); // should be harmless
+ BOOST_TEST( !fs::create_directories( "/" ) ); // ditto
+
+ fs::remove_all( "xx" ); // make sure slate is blank
+ BOOST_TEST( !fs::exists( "xx" ) ); // reality check
+
+ BOOST_TEST( fs::create_directories( "xx" ) );
+ BOOST_TEST( fs::exists( "xx" ) );
+ BOOST_TEST( fs::is_directory( "xx" ) );
+
+ BOOST_TEST( fs::create_directories( "xx/yy/zz" ) );
+ BOOST_TEST( fs::exists( "xx" ) );
+ BOOST_TEST( fs::exists( "xx/yy" ) );
+ BOOST_TEST( fs::exists( "xx/yy/zz" ) );
+ BOOST_TEST( fs::is_directory( "xx" ) );
+ BOOST_TEST( fs::is_directory( "xx/yy" ) );
+ BOOST_TEST( fs::is_directory( "xx/yy/zz" ) );
+
+ path is_a_file( "xx/uu" );
+ {
+ std::ofstream f( is_a_file.external_file_string().c_str() );
+ BOOST_TEST( !!f );
+ }
+ BOOST_TEST( throws_fs_error(
+ boost::bind( BOOST_BND(fs::create_directories), is_a_file ) ) );
+ BOOST_TEST( throws_fs_error(
+ boost::bind( BOOST_BND(fs::create_directories), is_a_file / "aa" ) ) );
+
+// recursive_directory_iterator tests ----------------------------------------//
+
+ sys::error_code ec;
+ fs::recursive_directory_iterator it( "/no-such-path", ec );
+ BOOST_TEST( ec );
+ BOOST_TEST( throws_fs_error(
+ boost::bind( create_recursive_iterator, "/no-such-path" ) ) );
+
+ fs::remove( "xx/uu" );
+
+#ifdef BOOST_WINDOWS_API
+ // These tests depends on ordering of directory entries, and that's guaranteed
+ // on Windows but not necessarily on other operating systems
+ {
+ std::ofstream f( "xx/yya" );
+ BOOST_TEST( !!f );
+ }
+
+ for ( it = fs::recursive_directory_iterator( "xx" );
+ it != fs::recursive_directory_iterator(); ++it )
+ { std::cout << it->path() << '\n'; }
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_TEST( it->path() == "xx/yy" );
+ BOOST_TEST( it.level() == 0 );
+ ++it;
+ BOOST_TEST( it->path() == "xx/yy/zz" );
+ BOOST_TEST( it.level() == 1 );
+ it.pop();
+ BOOST_TEST( it->path() == "xx/yya" );
+ BOOST_TEST( it.level() == 0 );
+ it++;
+ BOOST_TEST( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_TEST( it->path() == "xx/yy" );
+ it.no_push();
+ ++it;
+ BOOST_TEST( it->path() == "xx/yya" );
+ ++it;
+ BOOST_TEST( it == fs::recursive_directory_iterator() );
+
+ fs::remove( "xx/yya" );
+#endif
+
+ it = fs::recursive_directory_iterator( "xx/yy/zz" );
+ BOOST_TEST( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_TEST( it->path() == "xx/yy" );
+ BOOST_TEST( it.level() == 0 );
+ ++it;
+ BOOST_TEST( it->path() == "xx/yy/zz" );
+ BOOST_TEST( it.level() == 1 );
+ it++;
+ BOOST_TEST( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_TEST( it->path() == "xx/yy" );
+ it.no_push();
+ ++it;
+ BOOST_TEST( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_TEST( it->path() == "xx/yy" );
+ ++it;
+ it.pop();
+ BOOST_TEST( it == fs::recursive_directory_iterator() );
+
+
+
+ // nothrow wrong. see imp. Make sure failed basic_directory_iterator
+ // ctor creates the end iterator.
+
+
+
+
+ return ::boost::report_errors();
+}
diff --git a/src/third_party/boost/libs/filesystem/v2/test/deprecated_test.cpp b/src/third_party/boost/libs/filesystem/v2/test/deprecated_test.cpp
new file mode 100644
index 00000000000..246ffe67136
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/deprecated_test.cpp
@@ -0,0 +1,205 @@
+// deprecated_test program --------------------------------------------------//
+
+// Copyright Beman Dawes 2002
+// Copyright Vladimir Prus 2002
+
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+// This test verifies that various deprecated names still compile. This is
+// important to preserve existing code that uses the old names.
+
+#define BOOST_FILESYSTEM_VERSION 2
+
+#include <boost/filesystem.hpp>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/detail/lightweight_main.hpp>
+
+namespace fs = boost::filesystem;
+using boost::filesystem::path;
+
+#define PATH_CHECK( a, b ) check( a, b, __LINE__ )
+
+namespace
+{
+ std::string platform( BOOST_PLATFORM );
+
+ void check( const fs::path & source,
+ const std::string & expected, int line )
+ {
+ if ( source.string()== expected ) return;
+
+ ++::boost::detail::test_errors();
+
+ std::cout << '(' << line << ") source.string(): \"" << source.string()
+ << "\" != expected: \"" << expected
+ << "\"" << std::endl;
+ }
+
+ void check_normalize()
+ {
+ PATH_CHECK( path("").normalize(), "" );
+ PATH_CHECK( path("/").normalize(), "/" );
+ PATH_CHECK( path("//").normalize(), "//" );
+ PATH_CHECK( path("///").normalize(), "/" );
+ PATH_CHECK( path("f").normalize(), "f" );
+ PATH_CHECK( path("foo").normalize(), "foo" );
+ PATH_CHECK( path("foo/").normalize(), "foo/." );
+ PATH_CHECK( path("f/").normalize(), "f/." );
+ PATH_CHECK( path( "/foo" ).normalize(), "/foo" );
+ PATH_CHECK( path( "foo/bar" ).normalize(), "foo/bar" );
+ PATH_CHECK( path("..").normalize(), ".." );
+ PATH_CHECK( path("../..").normalize(), "../.." );
+ PATH_CHECK( path("/..").normalize(), "/.." );
+ PATH_CHECK( path("/../..").normalize(), "/../.." );
+ PATH_CHECK( path("../foo").normalize(), "../foo" );
+ PATH_CHECK( path("foo/..").normalize(), "." );
+ PATH_CHECK( path("foo/../").normalize(), "./." );
+ PATH_CHECK( (path("foo") / "..").normalize() , "." );
+ PATH_CHECK( path("foo/...").normalize(), "foo/..." );
+ PATH_CHECK( path("foo/.../").normalize(), "foo/.../." );
+ PATH_CHECK( path("foo/..bar").normalize(), "foo/..bar" );
+ PATH_CHECK( path("../f").normalize(), "../f" );
+ PATH_CHECK( path("/../f").normalize(), "/../f" );
+ PATH_CHECK( path("f/..").normalize(), "." );
+ PATH_CHECK( (path("f") / "..").normalize() , "." );
+ PATH_CHECK( path("foo/../..").normalize(), ".." );
+ PATH_CHECK( path("foo/../../").normalize(), "../." );
+ PATH_CHECK( path("foo/../../..").normalize(), "../.." );
+ PATH_CHECK( path("foo/../../../").normalize(), "../../." );
+ PATH_CHECK( path("foo/../bar").normalize(), "bar" );
+ PATH_CHECK( path("foo/../bar/").normalize(), "bar/." );
+ PATH_CHECK( path("foo/bar/..").normalize(), "foo" );
+ PATH_CHECK( path("foo/bar/../").normalize(), "foo/." );
+ PATH_CHECK( path("foo/bar/../..").normalize(), "." );
+ PATH_CHECK( path("foo/bar/../../").normalize(), "./." );
+ PATH_CHECK( path("foo/bar/../blah").normalize(), "foo/blah" );
+ PATH_CHECK( path("f/../b").normalize(), "b" );
+ PATH_CHECK( path("f/b/..").normalize(), "f" );
+ PATH_CHECK( path("f/b/../").normalize(), "f/." );
+ PATH_CHECK( path("f/b/../a").normalize(), "f/a" );
+ PATH_CHECK( path("foo/bar/blah/../..").normalize(), "foo" );
+ PATH_CHECK( path("foo/bar/blah/../../bletch").normalize(), "foo/bletch" );
+ PATH_CHECK( path( "//net" ).normalize(), "//net" );
+ PATH_CHECK( path( "//net/" ).normalize(), "//net/" );
+ PATH_CHECK( path( "//..net" ).normalize(), "//..net" );
+ PATH_CHECK( path( "//net/.." ).normalize(), "//net/.." );
+ PATH_CHECK( path( "//net/foo" ).normalize(), "//net/foo" );
+ PATH_CHECK( path( "//net/foo/" ).normalize(), "//net/foo/." );
+ PATH_CHECK( path( "//net/foo/.." ).normalize(), "//net/" );
+ PATH_CHECK( path( "//net/foo/../" ).normalize(), "//net/." );
+
+ PATH_CHECK( path( "/net/foo/bar" ).normalize(), "/net/foo/bar" );
+ PATH_CHECK( path( "/net/foo/bar/" ).normalize(), "/net/foo/bar/." );
+ PATH_CHECK( path( "/net/foo/.." ).normalize(), "/net" );
+ PATH_CHECK( path( "/net/foo/../" ).normalize(), "/net/." );
+
+ PATH_CHECK( path( "//net//foo//bar" ).normalize(), "//net/foo/bar" );
+ PATH_CHECK( path( "//net//foo//bar//" ).normalize(), "//net/foo/bar/." );
+ PATH_CHECK( path( "//net//foo//.." ).normalize(), "//net/" );
+ PATH_CHECK( path( "//net//foo//..//" ).normalize(), "//net/." );
+
+ PATH_CHECK( path( "///net///foo///bar" ).normalize(), "/net/foo/bar" );
+ PATH_CHECK( path( "///net///foo///bar///" ).normalize(), "/net/foo/bar/." );
+ PATH_CHECK( path( "///net///foo///.." ).normalize(), "/net" );
+ PATH_CHECK( path( "///net///foo///..///" ).normalize(), "/net/." );
+
+ if ( platform == "Windows" )
+ {
+ PATH_CHECK( path( "c:.." ).normalize(), "c:.." );
+ PATH_CHECK( path( "c:foo/.." ).normalize(), "c:" );
+
+ PATH_CHECK( path( "c:foo/../" ).normalize(), "c:." );
+
+ PATH_CHECK( path( "c:/foo/.." ).normalize(), "c:/" );
+ PATH_CHECK( path( "c:/foo/../" ).normalize(), "c:/." );
+ PATH_CHECK( path( "c:/.." ).normalize(), "c:/.." );
+ PATH_CHECK( path( "c:/../" ).normalize(), "c:/../." );
+ PATH_CHECK( path( "c:/../.." ).normalize(), "c:/../.." );
+ PATH_CHECK( path( "c:/../../" ).normalize(), "c:/../../." );
+ PATH_CHECK( path( "c:/../foo" ).normalize(), "c:/../foo" );
+ PATH_CHECK( path( "c:/../foo/" ).normalize(), "c:/../foo/." );
+ PATH_CHECK( path( "c:/../../foo" ).normalize(), "c:/../../foo" );
+ PATH_CHECK( path( "c:/../../foo/" ).normalize(), "c:/../../foo/." );
+ PATH_CHECK( path( "c:/..foo" ).normalize(), "c:/..foo" );
+ }
+ else // POSIX
+ {
+ PATH_CHECK( path( "c:.." ).normalize(), "c:.." );
+ PATH_CHECK( path( "c:foo/.." ).normalize(), "." );
+ PATH_CHECK( path( "c:foo/../" ).normalize(), "./." );
+ PATH_CHECK( path( "c:/foo/.." ).normalize(), "c:" );
+ PATH_CHECK( path( "c:/foo/../" ).normalize(), "c:/." );
+ PATH_CHECK( path( "c:/.." ).normalize(), "." );
+ PATH_CHECK( path( "c:/../" ).normalize(), "./." );
+ PATH_CHECK( path( "c:/../.." ).normalize(), ".." );
+ PATH_CHECK( path( "c:/../../" ).normalize(), "../." );
+ PATH_CHECK( path( "c:/../foo" ).normalize(), "foo" );
+ PATH_CHECK( path( "c:/../foo/" ).normalize(), "foo/." );
+ PATH_CHECK( path( "c:/../../foo" ).normalize(), "../foo" );
+ PATH_CHECK( path( "c:/../../foo/" ).normalize(), "../foo/." );
+ PATH_CHECK( path( "c:/..foo" ).normalize(), "c:/..foo" );
+ }
+ }
+} // unnamed namespace
+
+//----------------------------------------------------------------------------//
+
+int cpp_main( int /*argc*/, char * /*argv*/[] )
+{
+ // The choice of platform is make at runtime rather than compile-time
+ // so that compile errors for all platforms will be detected even though
+ // only the current platform is runtime tested.
+ platform = ( platform == "Win32" || platform == "Win64" || platform == "Cygwin" )
+ ? "Windows"
+ : "POSIX";
+ std::cout << "Platform is " << platform << '\n';
+
+ path::default_name_check( fs::no_check );
+
+ fs::directory_entry de( "foo/bar" );
+
+ de.replace_leaf( "", fs::file_status(), fs::file_status() );
+
+ de.leaf();
+ de.string();
+
+ fs::path ng( " no-way, Jose" );
+ BOOST_TEST( !fs::is_regular( ng ) ); // verify deprecated name still works
+ BOOST_TEST( !fs::symbolic_link_exists( "nosuchfileordirectory" ) );
+
+ check_normalize();
+
+// extension() tests ---------------------------------------------------------//
+
+ BOOST_TEST( fs::extension("a/b") == "" );
+ BOOST_TEST( fs::extension("a/b.txt") == ".txt" );
+ BOOST_TEST( fs::extension("a/b.") == "." );
+ BOOST_TEST( fs::extension("a.b.c") == ".c" );
+ BOOST_TEST( fs::extension("a.b.c.") == "." );
+ BOOST_TEST( fs::extension("") == "" );
+ BOOST_TEST( fs::extension("a/") == "." );
+
+// basename() tests ----------------------------------------------------------//
+
+ BOOST_TEST( fs::basename("b") == "b" );
+ BOOST_TEST( fs::basename("a/b.txt") == "b" );
+ BOOST_TEST( fs::basename("a/b.") == "b" );
+ BOOST_TEST( fs::basename("a.b.c") == "a.b" );
+ BOOST_TEST( fs::basename("a.b.c.") == "a.b.c" );
+ BOOST_TEST( fs::basename("") == "" );
+
+// change_extension tests ---------------------------------------------------//
+
+ BOOST_TEST( fs::change_extension("a.txt", ".tex").string() == "a.tex" );
+ BOOST_TEST( fs::change_extension("a.", ".tex").string() == "a.tex" );
+ BOOST_TEST( fs::change_extension("a", ".txt").string() == "a.txt" );
+ BOOST_TEST( fs::change_extension("a.b.txt", ".tex").string() == "a.b.tex" );
+ // see the rationale in html docs for explanation why this works
+ BOOST_TEST( fs::change_extension("", ".png").string() == ".png" );
+
+ return ::boost::report_errors();
+}
diff --git a/src/third_party/boost/libs/filesystem/v2/test/equivalent.cpp b/src/third_party/boost/libs/filesystem/v2/test/equivalent.cpp
new file mode 100644
index 00000000000..be3089afd60
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/equivalent.cpp
@@ -0,0 +1,39 @@
+// equivalent program -------------------------------------------------------//
+
+// Copyright (c) 2004 Beman Dawes
+
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
+// at http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+//----------------------------------------------------------------------------//
+
+#include <boost/filesystem/operations.hpp>
+#include <iostream>
+#include <exception>
+
+int main( int argc, char * argv[] )
+{
+ boost::filesystem::path::default_name_check( boost::filesystem::native );
+ if ( argc != 3 )
+ {
+ std::cout << "Usage: equivalent path1 path2\n";
+ return 2;
+ }
+
+ bool eq;
+ try
+ {
+ eq = boost::filesystem::equivalent( argv[1], argv[2] );
+ }
+ catch ( const std::exception & ex )
+ {
+ std::cout << ex.what() << "\n";
+ return 3;
+ }
+
+ std::cout << (eq ? "Paths are equivalent\n" : "Paths are not equivalent\n");
+ return !eq;
+}
diff --git a/src/third_party/boost/libs/filesystem/v2/test/fstream_test.cpp b/src/third_party/boost/libs/filesystem/v2/test/fstream_test.cpp
new file mode 100644
index 00000000000..331ccd0038b
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/fstream_test.cpp
@@ -0,0 +1,184 @@
+// fstream_test.cpp --------------------------------------------------------//
+
+// Copyright Beman Dawes 2002.
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+#define BOOST_FILESYSTEM_VERSION 2
+
+#include <boost/config/warning_disable.hpp>
+
+// See deprecated_test for tests of deprecated features
+#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+# define BOOST_FILESYSTEM_NO_DEPRECATED
+#endif
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#include <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <string>
+#include <iostream>
+#include <cstdio> // for std::remove
+
+#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
+
+#ifndef BOOST_FILESYSTEM2_NARROW_ONLY
+# include "lpath.hpp"
+#endif
+
+namespace fs = boost::filesystem;
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_STDC_NAMESPACE
+ namespace std { using ::remove; }
+#endif
+
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/detail/lightweight_main.hpp>
+
+namespace
+{
+ bool cleanup = true;
+
+ template< class Path >
+ void test( const Path & p )
+ {
+ fs::remove( p );
+# if !BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) // VC++ 6.0 can't handle open
+ {
+ std::cout << " in test 1\n";
+ fs::filebuf fb1;
+ fb1.open( p, std::ios_base::out );
+ BOOST_TEST( fb1.is_open() );
+ }
+ {
+ std::cout << " in test 2\n";
+ fs::filebuf fb2;
+ fb2.open( p, std::ios_base::in );
+ BOOST_TEST( fb2.is_open() );
+ }
+# else
+ std::cout << "<note>\n";
+ std::cout <<
+ "VC++6.0 does not support boost::filesystem open()\n";
+# endif
+ {
+ std::cout << " in test 3\n";
+ fs::ifstream tfs( p );
+ BOOST_TEST( tfs.is_open() );
+ }
+ {
+ std::cout << " in test 4\n";
+ fs::ifstream tfs( p / p.filename() ); // should fail
+ BOOST_TEST( !tfs.is_open() );
+ }
+ {
+ std::cout << " in test 5\n";
+ fs::ifstream tfs( p, std::ios_base::in );
+ BOOST_TEST( tfs.is_open() );
+ }
+# if !BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) // VC++ 6.0 can't handle open
+ {
+ std::cout << " in test 6\n";
+ fs::ifstream tfs;
+ tfs.open( p );
+ BOOST_TEST( tfs.is_open() );
+ }
+ {
+ std::cout << " in test 7\n";
+ fs::ifstream tfs;
+ tfs.open( p, std::ios_base::in );
+ BOOST_TEST( tfs.is_open() );
+ }
+# endif
+ {
+ std::cout << " in test 8\n";
+ fs::ofstream tfs( p );
+ BOOST_TEST( tfs.is_open() );
+ }
+ {
+ std::cout << " in test 9\n";
+ fs::ofstream tfs( p, std::ios_base::out );
+ BOOST_TEST( tfs.is_open() );
+ }
+# if !BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) // VC++ 6.0 can't handle open
+ {
+ std::cout << " in test 10\n";
+ fs::ofstream tfs;
+ tfs.open( p );
+ BOOST_TEST( tfs.is_open() );
+ }
+ {
+ std::cout << " in test 11\n";
+ fs::ofstream tfs;
+ tfs.open( p, std::ios_base::out );
+ BOOST_TEST( tfs.is_open() );
+ }
+# endif
+ {
+ std::cout << " in test 12\n";
+ fs::fstream tfs( p );
+ BOOST_TEST( tfs.is_open() );
+ }
+ {
+ std::cout << " in test 13\n";
+ fs::fstream tfs( p, std::ios_base::in|std::ios_base::out );
+ BOOST_TEST( tfs.is_open() );
+ }
+# if !BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) // VC++ 6.0 can't handle open
+ {
+ std::cout << " in test 14\n";
+ fs::fstream tfs;
+ tfs.open( p );
+ BOOST_TEST( tfs.is_open() );
+ }
+ {
+ std::cout << " in test 15\n";
+ fs::fstream tfs;
+ tfs.open( p, std::ios_base::in|std::ios_base::out );
+ BOOST_TEST( tfs.is_open() );
+ }
+# endif
+
+ if ( cleanup )
+ fs::remove( p );
+
+ } // test
+} // unnamed namespace
+
+int cpp_main( int argc, char*[] )
+{
+ if ( argc > 1 ) cleanup = false;
+
+ // test fs::path
+ std::cout << "path tests:\n";
+ test( fs::path( "v2_fstream_test" ) );
+
+#ifndef BOOST_FILESYSTEM2_NARROW_ONLY
+
+ // So that tests are run with known encoding, use Boost UTF-8 codecvt
+ std::locale global_loc = std::locale();
+ std::locale loc( global_loc, new fs::detail::utf8_codecvt_facet );
+ fs::wpath_traits::imbue( loc );
+
+ // test fs::wpath
+ // x2780 is circled 1 against white background == e2 9e 80 in UTF-8
+ // x2781 is circled 2 against white background == e2 9e 81 in UTF-8
+ std::cout << "\nwpath tests:\n";
+ test( fs::wpath( L"v2_fstream_test_\x2780" ) );
+
+ // test user supplied basic_path
+ const long lname[] = { 'f', 's', 'r', 'e', 'a', 'm', '_', 't', 'e', 's',
+ 't', '_', 'l', 'p', 'a', 't', 'h', 0 };
+ std::cout << "\nlpath tests:\n";
+ test( user::lpath( lname ) );
+
+#endif
+
+ return ::boost::report_errors();
+}
diff --git a/src/third_party/boost/libs/filesystem/v2/test/large_file_support_test.cpp b/src/third_party/boost/libs/filesystem/v2/test/large_file_support_test.cpp
new file mode 100644
index 00000000000..8d202400227
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/large_file_support_test.cpp
@@ -0,0 +1,42 @@
+// Boost large_file_support_test.cpp ---------------------------------------//
+
+// Copyright Beman Dawes 2004.
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+#define BOOST_FILESYSTEM_VERSION 2
+
+// See deprecated_test for tests of deprecated features
+#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+# define BOOST_FILESYSTEM_NO_DEPRECATED
+#endif
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#include <boost/filesystem/operations.hpp>
+namespace fs = boost::filesystem;
+
+#include <iostream>
+
+int main()
+{
+ if ( fs::detail::possible_large_file_size_support() )
+ {
+ std::cout << "It appears that file sizes greater that 2 gigabytes are possible\n"
+ "for this configuration on this platform since the operating system\n"
+ "does use a large enough integer type to report large file sizes.\n\n"
+ "Whether or not such support is actually present depends on the OS\n";
+ return 0;
+ }
+ std::cout << "The operating system is using an integer type to report file sizes\n"
+ "that can not represent file sizes greater that 2 gigabytes (31-bits).\n"
+ "Thus the Filesystem Library will not correctly deal with such large\n"
+ "files. If you think that this operatiing system should be able to\n"
+ "support large files, please report the problem to the Boost developers\n"
+ "mailing list.\n";
+ return 1;
+}
diff --git a/src/third_party/boost/libs/filesystem/v2/test/lpath.hpp b/src/third_party/boost/libs/filesystem/v2/test/lpath.hpp
new file mode 100644
index 00000000000..36671fa2451
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/lpath.hpp
@@ -0,0 +1,101 @@
+// Boost lpath.hpp ---------------------------------------------------------//
+
+// Copyright Beman Dawes 2005
+
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+#include <boost/filesystem/v2/path.hpp>
+#include <cwchar> // for std::mbstate_t
+#include <string>
+#include <ios> // for std::streamoff
+
+namespace std
+{
+ // Note well: this specialization is meant only to support wide_test.cpp.
+ // It is not fully functional, fully correct, or efficient.
+ template<> struct char_traits<long>
+ {
+ typedef long char_type;
+ typedef long int_type;
+ typedef streamoff off_type;
+ typedef streampos pos_type;
+ typedef mbstate_t state_type;
+ static void assign(char_type& c1, const char_type& c2){c1=c2;}
+ static bool eq(const char_type& c1, const char_type& c2){return c1==c2;}
+ static bool lt(const char_type& c1, const char_type& c2){return c1<c2;}
+ static int compare(const char_type* s1, const char_type* s2, size_t n)
+ {
+ const char_type* e = s1 + n;
+ for ( ;s1 != e && *s1 == *s2; ++s1, ++s2 ) {}
+ return s1 == e ? 0 : (*s1<*s2 ? -1 : 1);
+ }
+ static size_t length(const char_type* s)
+ { const char_type* b=s; for(;*s!=0L;++s){} return s-b; }
+
+ static const char_type* find(const char_type* /*s*/, size_t /*n*/, const char_type& /*a*/)
+ { return 0; }
+
+ // copy semantics will do for wide_test
+ static char_type* move(char_type* s1, const char_type* s2, size_t n)
+ { char_type* b=s1; for(const char_type* e=s1+n;s1!=e;++s1,++s2) *s1=*s2; return b; }
+
+ static char_type* copy(char_type* s1, const char_type* s2, size_t n)
+ { char_type* b=s1; for(const char_type* e=s1+n;s1!=e;++s1,++s2) *s1=*s2; return b; }
+
+ static char_type* assign(char_type* s, size_t n, char_type a)
+ { char_type* b=s; for(char_type* e=s+n;s!=e;++s) *s=a; return b; }
+
+ static int_type not_eof(const int_type& c);
+ static char_type to_char_type(const int_type& c);
+ static int_type to_int_type(const char_type& c);
+ static bool eq_int_type(const int_type& c1, const int_type& c2);
+ static int_type eof();
+ };
+}
+
+namespace user
+{
+ typedef std::basic_string<long> lstring;
+ struct lpath_traits;
+ typedef boost::filesystem::basic_path<lstring, lpath_traits> lpath;
+
+ struct lpath_traits
+ {
+ typedef lstring internal_string_type;
+ typedef std::string external_string_type;
+
+ static external_string_type to_external( const lpath &,
+ const internal_string_type & src )
+ {
+ external_string_type tmp;
+ for ( internal_string_type::const_iterator it( src.begin() );
+ it != src.end(); ++it )
+ {
+ tmp += static_cast<external_string_type::value_type>(*it);
+ }
+ return tmp;
+ }
+
+ static internal_string_type to_internal( const external_string_type & src )
+ {
+ internal_string_type tmp;
+ for ( external_string_type::const_iterator it( src.begin() );
+ it != src.end(); ++it ) tmp += *it;
+ return tmp;
+ }
+ };
+
+} // namespace user
+
+namespace boost
+{
+ namespace filesystem2
+ {
+ template<> struct is_basic_path<user::lpath>
+ { static const bool value = true; };
+ }
+}
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/common.vsprops b/src/third_party/boost/libs/filesystem/v2/test/msvc/common.vsprops
new file mode 100644
index 00000000000..07762e9078e
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/common.vsprops
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="common"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../../.."
+ PreprocessorDefinitions="BOOST_ALL_NO_LIB;BOOST_SYSTEM_DYN_LINK;BOOST_FILESYSTEM_DYN_LINK"
+ ExceptionHandling="2"
+ WarningLevel="4"
+ />
+</VisualStudioPropertySheet>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/convenience_test/convenience_test.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/convenience_test/convenience_test.vcproj
new file mode 100644
index 00000000000..c05d0e861d8
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/convenience_test/convenience_test.vcproj
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="convenience_test"
+ ProjectGUID="{1AA29237-E10E-400B-8A30-4DA67FFB648C}"
+ RootNamespace="convenience_test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\convenience_test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/deprecated_test/deprecated_test.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/deprecated_test/deprecated_test.vcproj
new file mode 100644
index 00000000000..2a46cb4e2d8
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/deprecated_test/deprecated_test.vcproj
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="deprecated_test"
+ ProjectGUID="{EA1530CD-7058-4912-8B51-8D55A07F0A1D}"
+ RootNamespace="deprecated_test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\deprecated_test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/filesystem-v2.sln b/src/third_party/boost/libs/filesystem/v2/test/msvc/filesystem-v2.sln
new file mode 100644
index 00000000000..7b731dc0552
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/filesystem-v2.sln
@@ -0,0 +1,119 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filesystem_dll", "filesystem_dll\filesystem_dll.vcproj", "{F31C02C7-63A4-489C-A176-695D68E5BCA4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "operations_test", "operations_test\operations_test.vcproj", "{9C8BACE4-BCA5-479C-801C-AB903DE931D1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "system_dll", "system_dll\system_dll.vcproj", "{15371D22-F930-4286-9126-C3516E78CB09}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_test", "path_test\path_test.vcproj", "{EAB6925F-DB89-4759-BC8E-6F1AB3176393}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fstream_test", "fstream_test\fstream_test.vcproj", "{F80D96CE-07DC-48DF-85FD-399A7266E457}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convenience_test", "convenience_test\convenience_test.vcproj", "{1AA29237-E10E-400B-8A30-4DA67FFB648C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wide_test", "wide_test\wide_test.vcproj", "{124C635E-ABDE-4DA7-BECB-3E3AD16CDDF6}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_ls", "simple_ls\simple_ls.vcproj", "{FE2BA1DC-82B5-4B4A-8E5C-A1C2AE0C6EF0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbcopy", "mbcopy\mbcopy.vcproj", "{80712DDD-CA0F-4177-AD0F-1392BB497902}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "large_file_support_test", "large_file_support_test\large_file_support_test.vcproj", "{49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "deprecated_test", "deprecated_test\deprecated_test.vcproj", "{EA1530CD-7058-4912-8B51-8D55A07F0A1D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4}.Debug|Win32.Build.0 = Debug|Win32
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4}.Release|Win32.ActiveCfg = Release|Win32
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4}.Release|Win32.Build.0 = Release|Win32
+ {9C8BACE4-BCA5-479C-801C-AB903DE931D1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9C8BACE4-BCA5-479C-801C-AB903DE931D1}.Debug|Win32.Build.0 = Debug|Win32
+ {9C8BACE4-BCA5-479C-801C-AB903DE931D1}.Release|Win32.ActiveCfg = Release|Win32
+ {9C8BACE4-BCA5-479C-801C-AB903DE931D1}.Release|Win32.Build.0 = Release|Win32
+ {15371D22-F930-4286-9126-C3516E78CB09}.Debug|Win32.ActiveCfg = Debug|Win32
+ {15371D22-F930-4286-9126-C3516E78CB09}.Debug|Win32.Build.0 = Debug|Win32
+ {15371D22-F930-4286-9126-C3516E78CB09}.Release|Win32.ActiveCfg = Release|Win32
+ {15371D22-F930-4286-9126-C3516E78CB09}.Release|Win32.Build.0 = Release|Win32
+ {EAB6925F-DB89-4759-BC8E-6F1AB3176393}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EAB6925F-DB89-4759-BC8E-6F1AB3176393}.Debug|Win32.Build.0 = Debug|Win32
+ {EAB6925F-DB89-4759-BC8E-6F1AB3176393}.Release|Win32.ActiveCfg = Release|Win32
+ {EAB6925F-DB89-4759-BC8E-6F1AB3176393}.Release|Win32.Build.0 = Release|Win32
+ {F80D96CE-07DC-48DF-85FD-399A7266E457}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F80D96CE-07DC-48DF-85FD-399A7266E457}.Debug|Win32.Build.0 = Debug|Win32
+ {F80D96CE-07DC-48DF-85FD-399A7266E457}.Release|Win32.ActiveCfg = Release|Win32
+ {F80D96CE-07DC-48DF-85FD-399A7266E457}.Release|Win32.Build.0 = Release|Win32
+ {1AA29237-E10E-400B-8A30-4DA67FFB648C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1AA29237-E10E-400B-8A30-4DA67FFB648C}.Debug|Win32.Build.0 = Debug|Win32
+ {1AA29237-E10E-400B-8A30-4DA67FFB648C}.Release|Win32.ActiveCfg = Release|Win32
+ {1AA29237-E10E-400B-8A30-4DA67FFB648C}.Release|Win32.Build.0 = Release|Win32
+ {124C635E-ABDE-4DA7-BECB-3E3AD16CDDF6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {124C635E-ABDE-4DA7-BECB-3E3AD16CDDF6}.Debug|Win32.Build.0 = Debug|Win32
+ {124C635E-ABDE-4DA7-BECB-3E3AD16CDDF6}.Release|Win32.ActiveCfg = Release|Win32
+ {124C635E-ABDE-4DA7-BECB-3E3AD16CDDF6}.Release|Win32.Build.0 = Release|Win32
+ {FE2BA1DC-82B5-4B4A-8E5C-A1C2AE0C6EF0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE2BA1DC-82B5-4B4A-8E5C-A1C2AE0C6EF0}.Debug|Win32.Build.0 = Debug|Win32
+ {FE2BA1DC-82B5-4B4A-8E5C-A1C2AE0C6EF0}.Release|Win32.ActiveCfg = Release|Win32
+ {FE2BA1DC-82B5-4B4A-8E5C-A1C2AE0C6EF0}.Release|Win32.Build.0 = Release|Win32
+ {80712DDD-CA0F-4177-AD0F-1392BB497902}.Debug|Win32.ActiveCfg = Debug|Win32
+ {80712DDD-CA0F-4177-AD0F-1392BB497902}.Debug|Win32.Build.0 = Debug|Win32
+ {80712DDD-CA0F-4177-AD0F-1392BB497902}.Release|Win32.ActiveCfg = Release|Win32
+ {80712DDD-CA0F-4177-AD0F-1392BB497902}.Release|Win32.Build.0 = Release|Win32
+ {49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}.Debug|Win32.Build.0 = Debug|Win32
+ {49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}.Release|Win32.ActiveCfg = Release|Win32
+ {49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}.Release|Win32.Build.0 = Release|Win32
+ {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Debug|Win32.Build.0 = Debug|Win32
+ {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Release|Win32.ActiveCfg = Release|Win32
+ {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/filesystem_dll/filesystem_dll.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/filesystem_dll/filesystem_dll.vcproj
new file mode 100644
index 00000000000..39ab3c0c2a0
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/filesystem_dll/filesystem_dll.vcproj
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="filesystem_dll"
+ ProjectGUID="{F31C02C7-63A4-489C-A176-695D68E5BCA4}"
+ RootNamespace="filesystem_dll"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FILESYSTEM_DLL_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DefaultCharIsUnsigned="false"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FILESYSTEM_DLL_EXPORTS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\..\v3\src\utf8_codecvt_facet.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\v2_operations.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\v2_path.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\v2_portability.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/fstream_test/fstream_test.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/fstream_test/fstream_test.vcproj
new file mode 100644
index 00000000000..d2aff8bf8dc
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/fstream_test/fstream_test.vcproj
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="fstream_test"
+ ProjectGUID="{F80D96CE-07DC-48DF-85FD-399A7266E457}"
+ RootNamespace="fstream_test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\fstream_test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/large_file_support_test/large_file_support_test.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/large_file_support_test/large_file_support_test.vcproj
new file mode 100644
index 00000000000..2c3202b7df6
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/large_file_support_test/large_file_support_test.vcproj
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="large_file_support_test"
+ ProjectGUID="{49414D8C-BE1D-4C70-8E6B-7F2D3F5B18B0}"
+ RootNamespace="large_file_support_test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\large_file_support_test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/mbcopy/mbcopy.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/mbcopy/mbcopy.vcproj
new file mode 100644
index 00000000000..0e22c0e7526
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/mbcopy/mbcopy.vcproj
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="mbcopy"
+ ProjectGUID="{80712DDD-CA0F-4177-AD0F-1392BB497902}"
+ RootNamespace="mbcopy"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\example\mbcopy.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\example\mbpath.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/mbpath/mbpath.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/mbpath/mbpath.vcproj
new file mode 100644
index 00000000000..4748370193a
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/mbpath/mbpath.vcproj
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="mbpath"
+ ProjectGUID="{B81C9F3C-AAF4-480B-A194-D60D011AC1AF}"
+ RootNamespace="mbpath"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\example\mbpath.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/operations_test/operations_test.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/operations_test/operations_test.vcproj
new file mode 100644
index 00000000000..ed099e9f582
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/operations_test/operations_test.vcproj
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="operations_test"
+ ProjectGUID="{9C8BACE4-BCA5-479C-801C-AB903DE931D1}"
+ RootNamespace="operations_test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\operations_test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/path_test/path_test.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/path_test/path_test.vcproj
new file mode 100644
index 00000000000..ffe4342b8e2
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/path_test/path_test.vcproj
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="path_test"
+ ProjectGUID="{EAB6925F-DB89-4759-BC8E-6F1AB3176393}"
+ RootNamespace="path_test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\path_test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/simple_ls/simple_ls.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/simple_ls/simple_ls.vcproj
new file mode 100644
index 00000000000..19f98ff794c
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/simple_ls/simple_ls.vcproj
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="simple_ls"
+ ProjectGUID="{FE2BA1DC-82B5-4B4A-8E5C-A1C2AE0C6EF0}"
+ RootNamespace="simple_ls"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\example\simple_ls.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/system_dll/system_dll.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/system_dll/system_dll.vcproj
new file mode 100644
index 00000000000..7a5ccdeb686
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/system_dll/system_dll.vcproj
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="system_dll"
+ ProjectGUID="{15371D22-F930-4286-9126-C3516E78CB09}"
+ RootNamespace="system_dll"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SYSTEM_DLL_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SYSTEM_DLL_EXPORTS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\..\..\system\src\error_code.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/msvc/wide_test/wide_test.vcproj b/src/third_party/boost/libs/filesystem/v2/test/msvc/wide_test/wide_test.vcproj
new file mode 100644
index 00000000000..dd87db78942
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/msvc/wide_test/wide_test.vcproj
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="wide_test"
+ ProjectGUID="{124C635E-ABDE-4DA7-BECB-3E3AD16CDDF6}"
+ RootNamespace="wide_test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DefaultCharIsUnsigned="false"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\common.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Executing test $(TargetName).exe..."
+ CommandLine="&quot;$(TargetDir)\$(TargetName).exe&quot; --result_code=no --report_level=no"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\wide_test.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/third_party/boost/libs/filesystem/v2/test/operations_test.cpp b/src/third_party/boost/libs/filesystem/v2/test/operations_test.cpp
new file mode 100644
index 00000000000..c61f8b249fa
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/operations_test.cpp
@@ -0,0 +1,953 @@
+// Boost operations_test.cpp -----------------------------------------------//
+
+// Copyright Beman Dawes 2002.
+
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+#define BOOST_FILESYSTEM_VERSION 2
+
+#include <boost/config/warning_disable.hpp>
+
+// See deprecated_test for tests of deprecated features
+#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+# define BOOST_FILESYSTEM_NO_DEPRECATED
+#endif
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/convenience.hpp>
+#include <boost/cerrno.hpp>
+namespace fs = boost::filesystem;
+
+#include <boost/config.hpp>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/detail/lightweight_main.hpp>
+
+using boost::system::error_code;
+using boost::system::system_category;
+using boost::system::system_error;
+
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <cstring> // for strncmp, etc.
+#include <ctime>
+#include <cstdlib> // for system()
+
+#ifndef BOOST_FILESYSTEM2_NARROW_ONLY
+# define BOOST_BND(BOOST_FUNC_TO_DO) BOOST_FUNC_TO_DO<fs::path>
+#else
+# define BOOST_BND(BOOST_FUNC_TO_DO) BOOST_FUNC_TO_DO
+#endif
+
+// VC++ 7.0 and earlier has a serious namespace bug that causes a clash
+// between boost::filesystem::is_empty and the unrelated type trait
+// boost::is_empty.
+#if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300
+# define BOOST_FS_IS_EMPTY fs::is_empty
+#else
+# define BOOST_FS_IS_EMPTY fs::_is_empty
+#endif
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+ namespace std { using ::asctime; using ::gmtime; using ::localtime;
+ using ::difftime; using ::time; using ::tm; using ::mktime; using ::system; }
+# endif
+
+#ifdef BOOST_WINDOWS_API
+# include <windows.h>
+#endif
+
+#define CHECK_EXCEPTION(Functor,Expect) throws_fs_error(Functor,Expect,__LINE__)
+
+namespace
+{
+ typedef int errno_t;
+ std::string platform( BOOST_PLATFORM );
+ bool report_throws;
+ fs::directory_iterator end_itr;
+
+ unsigned short language_id; // 0 except for Windows
+
+ const char * temp_dir_name = "v2_operations_test";
+
+ void create_file( const fs::path & ph, const std::string & contents )
+ {
+ std::ofstream f( ph.file_string().c_str() );
+ if ( !f )
+ BOOST_FILESYSTEM_THROW( fs::filesystem_error( "operations_test create_file",
+ ph, error_code(errno, system_category()) ) );
+ if ( !contents.empty() ) f << contents;
+ }
+
+ void verify_file( const fs::path & ph, const std::string & expected )
+ {
+ std::ifstream f( ph.file_string().c_str() );
+ if ( !f )
+ BOOST_FILESYSTEM_THROW( fs::filesystem_error( "operations_test verify_file",
+ ph, error_code(errno, system_category()) ) );
+ std::string contents;
+ f >> contents;
+ if ( contents != expected )
+ BOOST_FILESYSTEM_THROW( fs::filesystem_error( "operations_test verify_file contents \""
+ + contents + "\" != \"" + expected + "\"", ph, error_code() ) );
+ }
+
+ template< typename F >
+ bool throws_fs_error( F func, errno_t en, int line )
+ {
+ try { func(); }
+
+ catch ( const fs::filesystem_error & ex )
+ {
+ if ( report_throws )
+ {
+ // use the what() convenience function to display exceptions
+ std::cout << "\n" << ex.what() << "\n";
+ }
+ if ( en == 0
+ || en == ex.code().default_error_condition().value() ) return true;
+ std::cout
+ << "\nWarning: line " << line
+ << " exception reports default_error_condition().value() " << ex.code().default_error_condition().value()
+ << ", should be " << en
+ << "\n value() is " << ex.code().value()
+ << std::endl;
+ return true;
+ }
+ return false;
+ }
+
+ // compile-only two argument "do-the-right-thing" tests
+ // verifies that all overload combinations compile without error
+ void do_not_call()
+ {
+ fs::path p;
+ std::string s;
+ const char * a = 0;
+ fs::copy_file( p, p );
+ fs::copy_file( s, p );
+ fs::copy_file( a, p );
+ fs::copy_file( p, s );
+ fs::copy_file( p, a );
+ fs::copy_file( s, s );
+ fs::copy_file( a, s );
+ fs::copy_file( s, a );
+ fs::copy_file( a, a );
+ }
+
+ void exception_tests()
+ {
+ bool exception_thrown;
+ exception_thrown = false;
+ try
+ {
+ fs::create_directory( "no-such-dir/foo/bar" );
+ }
+ catch ( std::runtime_error x )
+ {
+ exception_thrown = true;
+ if ( report_throws ) std::cout << x.what() << std::endl;
+ if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
+ // the stdcxx standard library apparently appends additional info
+ // to what(), so check only the initial portion:
+ BOOST_TEST( std::strncmp( x.what(),
+ "boost::filesystem::create_directory",
+ sizeof("boost::filesystem::create_directory")-1 ) == 0 );
+ }
+ BOOST_TEST( exception_thrown );
+
+ exception_thrown = false;
+ try
+ {
+ fs::create_directory( "no-such-dir/foo/bar" );
+ }
+ catch ( system_error x )
+ {
+ exception_thrown = true;
+ if ( report_throws ) std::cout << x.what() << std::endl;
+ if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
+ BOOST_TEST( std::strcmp( x.what(),
+ "boost::filesystem::create_directory: The system cannot find the path specified" ) == 0 );
+ }
+ BOOST_TEST( exception_thrown );
+
+ exception_thrown = false;
+ try
+ {
+ fs::create_directory( "no-such-dir/foo/bar" );
+ }
+ catch ( fs::filesystem_error x )
+ {
+ exception_thrown = true;
+ if ( report_throws ) std::cout << x.what() << std::endl;
+ if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
+ {
+ bool ok ( std::strcmp( x.what(),
+ "boost::filesystem::create_directory: The system cannot find the path specified: \"no-such-dir\\foo\\bar\"" ) == 0 );
+ BOOST_TEST( ok );
+ if ( !ok )
+ {
+ std::cout << "what returns \"" << x.what() << "\"" << std::endl;
+ }
+ }
+ }
+ BOOST_TEST( exception_thrown );
+
+ exception_thrown = false;
+ try
+ {
+ fs::create_directory( "no-such-dir/foo/bar" );
+ }
+ catch ( const fs::filesystem_error & x )
+ {
+ exception_thrown = true;
+ if ( report_throws ) std::cout << x.what() << std::endl;
+ if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
+ {
+ bool ok ( std::strcmp( x.what(),
+ "boost::filesystem::create_directory: The system cannot find the path specified: \"no-such-dir\\foo\\bar\"" ) == 0 );
+ BOOST_TEST( ok );
+ if ( !ok )
+ {
+ std::cout << "what returns \"" << x.what() << "\"" << std::endl;
+ }
+ }
+ }
+ BOOST_TEST( exception_thrown );
+ }
+
+ void bad_file_size()
+ {
+ fs::file_size( " No way, Jose" );
+ }
+
+ void bad_directory_size()
+ {
+ fs::file_size( fs::current_path<fs::path>() );
+ }
+
+ fs::path bad_create_directory_path;
+ void bad_create_directory()
+ {
+ fs::create_directory( bad_create_directory_path );
+ }
+
+ void bad_equivalent()
+ {
+ fs::equivalent( "no-such-path", "another-not-present-path" );
+ }
+
+ fs::path bad_remove_dir;
+ void bad_remove()
+ {
+ fs::remove( bad_remove_dir );
+ }
+
+ class renamer
+ {
+ public:
+ renamer( const fs::path & p1, const fs::path & p2 )
+ : from(p1), to(p2) {}
+ void operator()()
+ {
+ fs::rename( from, to );
+ }
+ private:
+ fs::path from;
+ fs::path to;
+ };
+
+} // unnamed namespace
+
+// main ------------------------------------------------------------------------------//
+
+int cpp_main( int argc, char * argv[] )
+{
+ if ( argc > 1 && *argv[1]=='-' && *(argv[1]+1)=='t' ) report_throws = true;
+
+ // The choice of platform is make at runtime rather than compile-time
+ // so that compile errors for all platforms will be detected even though
+ // only the current platform is runtime tested.
+# if defined( BOOST_POSIX_API )
+ platform = "POSIX";
+# elif defined( BOOST_WINDOWS_API )
+ platform = "Windows";
+# if !defined(__MINGW32__) && !defined(__CYGWIN__)
+ language_id = ::GetUserDefaultUILanguage();
+# else
+ language_id = 0x0409; // Assume US English
+# endif
+# else
+# error API should always be defined. Something is wrong with boost/system/api_config.hpp
+# endif
+ std::cout << "API is " << platform << std::endl;
+
+ exception_tests();
+
+ std::cout << "\ninitial_path<path>().string() is\n \""
+ << fs::initial_path<fs::path>().string()
+ << "\"\n";
+ std::cout << "\ninitial_path<fs::path>().file_string() is\n \""
+ << fs::initial_path<fs::path>().file_string()
+ << "\"\n\n";
+ BOOST_TEST( fs::initial_path<fs::path>().is_complete() );
+ BOOST_TEST( fs::current_path<fs::path>().is_complete() );
+ BOOST_TEST( fs::initial_path<fs::path>().string()
+ == fs::current_path<fs::path>().string() );
+
+ BOOST_TEST( fs::complete( "" ).empty() );
+ BOOST_TEST( fs::complete( "/" ).string() == fs::initial_path<fs::path>().root_path().string() );
+ BOOST_TEST( fs::complete( "foo" ).string() == fs::initial_path<fs::path>().string()+"/foo" );
+ BOOST_TEST( fs::complete( "/foo" ).string() == fs::initial_path<fs::path>().root_path().string()+"foo" );
+ BOOST_TEST( fs::complete( "foo", fs::path( "//net/bar" ) ).string()
+ == "//net/bar/foo" );
+
+ // predicate and status tests
+ BOOST_TEST( fs::exists( "/" ) );
+ fs::path ng( " no-way, Jose" );
+ BOOST_TEST( !fs::exists( ng ) );
+ BOOST_TEST( !fs::is_directory( ng ) );
+ BOOST_TEST( !fs::is_regular_file( ng ) );
+ BOOST_TEST( !fs::is_symlink( ng ) );
+ fs::file_status stat( fs::status( ng ) );
+ BOOST_TEST( fs::status_known( stat ) );
+ BOOST_TEST( !fs::exists( stat ) );
+ BOOST_TEST( !fs::is_directory( stat ) );
+ BOOST_TEST( !fs::is_regular_file( stat ) );
+ BOOST_TEST( !fs::is_other( stat ) );
+ BOOST_TEST( !fs::is_symlink( stat ) );
+ stat = fs::status( "" );
+ BOOST_TEST( fs::status_known( stat ) );
+ BOOST_TEST( !fs::exists( stat ) );
+ BOOST_TEST( !fs::is_directory( stat ) );
+ BOOST_TEST( !fs::is_regular_file( stat ) );
+ BOOST_TEST( !fs::is_other( stat ) );
+ BOOST_TEST( !fs::is_symlink( stat ) );
+
+ fs::path dir( fs::initial_path<fs::path>() / temp_dir_name );
+
+ if ( fs::exists( dir ) )
+ fs::remove_all( dir ); // remove residue from prior failed tests
+ BOOST_TEST( !fs::exists( dir ) );
+
+ // create a directory, then check it for consistency
+ // take extra care to report problems, since if this fails
+ // many subsequent tests will fail
+ try
+ {
+ fs::create_directory( dir );
+ }
+
+ catch ( const fs::filesystem_error & x )
+ {
+ std::cout << x.what() << "\n\n"
+ "***** Creating directory " << dir.string() << " failed. *****\n"
+ "***** This is a serious error that will prevent further tests *****\n"
+ "***** from returning useful results. Further testing is aborted. *****\n\n";
+ return 1;
+ }
+
+ catch ( ... )
+ {
+ std::cout << "\n\n"
+ "***** Creating directory " << dir.string() << " failed. *****\n"
+ "***** This is a serious error that will prevent further tests *****\n"
+ "***** from returning useful results. Further testing is aborted. *****\n\n";
+ return 1;
+ }
+
+ BOOST_TEST( fs::exists( dir ) );
+ BOOST_TEST( BOOST_FS_IS_EMPTY( dir ) );
+ BOOST_TEST( fs::is_directory( dir ) );
+ BOOST_TEST( !fs::is_regular_file( dir ) );
+ BOOST_TEST( !fs::is_other( dir ) );
+ BOOST_TEST( !fs::is_symlink( dir ) );
+ stat = fs::status( dir );
+ BOOST_TEST( fs::exists( stat ) );
+ BOOST_TEST( fs::is_directory( stat ) );
+ BOOST_TEST( !fs::is_regular_file( stat ) );
+ BOOST_TEST( !fs::is_other( stat ) );
+ BOOST_TEST( !fs::is_symlink( stat ) );
+
+ // Windows only tests
+ if ( platform == "Windows" )
+ {
+ BOOST_TEST( !fs::exists( fs::path( "//share-not" ) ) );
+ BOOST_TEST( !fs::exists( fs::path( "//share-not/" ) ) );
+ BOOST_TEST( !fs::exists( fs::path( "//share-not/foo" ) ) );
+ BOOST_TEST( !fs::exists( "tools/jam/src/:sys:stat.h" ) ); // !exists() if ERROR_INVALID_NAME
+ BOOST_TEST( !fs::exists( ":sys:stat.h" ) ); // !exists() if ERROR_INVALID_PARAMETER
+ BOOST_TEST( !fs::exists( "1:/" ) );
+ BOOST_TEST( dir.string().size() > 1
+ && dir.string()[1] == ':' ); // verify path includes drive
+
+ BOOST_TEST( fs::system_complete( "" ).empty() );
+ BOOST_TEST( fs::system_complete( "/" ).string()
+ == fs::initial_path<fs::path>().root_path().string() );
+ BOOST_TEST( fs::system_complete( "foo" ).string()
+ == fs::initial_path<fs::path>().string()+"/foo" );
+ BOOST_TEST( fs::system_complete( "/foo" ).string()
+ == fs::initial_path<fs::path>().root_path().string()+"foo" );
+ BOOST_TEST( fs::complete( fs::path( "c:/" ) ).string()
+ == "c:/" );
+ BOOST_TEST( fs::complete( fs::path( "c:/foo" ) ).string()
+ == "c:/foo" );
+
+ BOOST_TEST( fs::system_complete( fs::path( fs::initial_path<fs::path>().root_name() ) ).string() == fs::initial_path<fs::path>().string() );
+ BOOST_TEST( fs::system_complete( fs::path( fs::initial_path<fs::path>().root_name()
+ + "foo" ) ).string() == fs::initial_path<fs::path>().string()+"/foo" );
+ BOOST_TEST( fs::system_complete( fs::path( "c:/" ) ).string()
+ == "c:/" );
+ BOOST_TEST( fs::system_complete( fs::path( "c:/foo" ) ).string()
+ == "c:/foo" );
+ BOOST_TEST( fs::system_complete( fs::path( "//share" ) ).string()
+ == "//share" );
+ } // Windows
+
+ else if ( platform == "POSIX" )
+ {
+ BOOST_TEST( fs::system_complete( "" ).empty() );
+ BOOST_TEST( fs::initial_path<fs::path>().root_path().string() == "/" );
+ BOOST_TEST( fs::system_complete( "/" ).string() == "/" );
+ BOOST_TEST( fs::system_complete( "foo" ).string()
+ == fs::initial_path<fs::path>().string()+"/foo" );
+ BOOST_TEST( fs::system_complete( "/foo" ).string()
+ == fs::initial_path<fs::path>().root_path().string()+"foo" );
+ } // POSIX
+
+ // the bound functions should throw, so CHECK_EXCEPTION() should return true
+ BOOST_TEST( CHECK_EXCEPTION( bad_file_size, ENOENT ) );
+
+ // test path::exception members
+ try { fs::file_size( ng ); } // will throw
+
+ catch ( const fs::filesystem_error & ex )
+ {
+ BOOST_TEST( ex.path1().string() == " no-way, Jose" );
+ }
+ // several functions give unreasonable results if uintmax_t isn't 64-bits
+ std::cout << "sizeof(boost::uintmax_t) = " << sizeof(boost::uintmax_t) << '\n';
+ BOOST_TEST( sizeof( boost::uintmax_t ) >= 8 );
+
+ // set the current directory, then check it for consistency
+ fs::path original_dir = fs::current_path<fs::path>();
+ BOOST_TEST( dir != original_dir );
+ fs::current_path( dir );
+ BOOST_TEST( fs::current_path<fs::path>() == dir );
+ BOOST_TEST( fs::current_path<fs::path>() != original_dir );
+ fs::current_path( original_dir );
+ BOOST_TEST( fs::current_path<fs::path>() == original_dir );
+ BOOST_TEST( fs::current_path<fs::path>() != dir );
+ // make sure the overloads work
+ fs::current_path( dir.string().c_str() );
+ BOOST_TEST( fs::current_path<fs::path>() == dir );
+ BOOST_TEST( fs::current_path<fs::path>() != original_dir );
+ fs::current_path( original_dir.string() );
+ BOOST_TEST( fs::current_path<fs::path>() == original_dir );
+ BOOST_TEST( fs::current_path<fs::path>() != dir );
+
+ // make some reasonable assuptions for testing purposes
+ fs::space_info spi( fs::space( dir ) );
+ BOOST_TEST( spi.capacity > 1000000 );
+ BOOST_TEST( spi.free > 1000 );
+ BOOST_TEST( spi.capacity > spi.free );
+ BOOST_TEST( spi.free >= spi.available );
+
+ // it is convenient to display space, but older VC++ versions choke
+# if !defined(BOOST_MSVC) || _MSC_VER >= 1300 // 1300 == VC++ 7.0
+ std::cout << " capacity = " << spi.capacity << '\n';
+ std::cout << " free = " << spi.free << '\n';
+ std::cout << "available = " << spi.available << '\n';
+# endif
+
+ if ( platform == "Windows" )
+ BOOST_TEST( CHECK_EXCEPTION( bad_directory_size, ENOENT ) );
+ else
+ BOOST_TEST( CHECK_EXCEPTION( bad_directory_size, 0 ) );
+ BOOST_TEST( !fs::create_directory( dir ) );
+
+ BOOST_TEST( !fs::is_symlink( dir ) );
+ BOOST_TEST( !fs::is_symlink( "nosuchfileordirectory" ) );
+
+ fs::path d1( dir / "d1" );
+ BOOST_TEST( fs::create_directory( d1 ) );
+ BOOST_TEST( fs::exists( d1 ) );
+ BOOST_TEST( fs::is_directory( d1 ) );
+ BOOST_TEST( BOOST_FS_IS_EMPTY( d1 ) );
+
+// boost::function_requires< boost::InputIteratorConcept< fs::directory_iterator > >();
+
+ bool dir_itr_exception(false);
+ try { fs::directory_iterator it( "" ); }
+ catch ( const fs::filesystem_error & ) { dir_itr_exception = true; }
+ BOOST_TEST( dir_itr_exception );
+
+ dir_itr_exception = false;
+ try { fs::directory_iterator it( "nosuchdirectory" ); }
+ catch ( const fs::filesystem_error & ) { dir_itr_exception = true; }
+ BOOST_TEST( dir_itr_exception );
+
+ dir_itr_exception = false;
+ try
+ {
+ error_code ec;
+ fs::directory_iterator it( "nosuchdirectory", ec );
+ BOOST_TEST( ec );
+ BOOST_TEST( ec == fs::detail::not_found_error() );
+ }
+ catch ( const fs::filesystem_error & ) { dir_itr_exception = true; }
+ BOOST_TEST( !dir_itr_exception );
+
+ {
+ // probe query function overloads
+ fs::directory_iterator dir_itr( dir );
+ BOOST_TEST( fs::is_directory( *dir_itr ) );
+ BOOST_TEST( fs::is_directory( dir_itr->status() ) );
+ BOOST_TEST( fs::is_directory( fs::symlink_status(*dir_itr) ) );
+ BOOST_TEST( fs::is_directory( dir_itr->symlink_status() ) );
+ BOOST_TEST( dir_itr->path().filename() == "d1" );
+ }
+
+ // create a second directory named d2
+ fs::path d2( dir / "d2" );
+ fs::create_directory(d2 );
+ BOOST_TEST( fs::exists( d2 ) );
+ BOOST_TEST( fs::is_directory( d2 ) );
+
+ // test the basic operation of directory_iterators, and test that
+ // stepping one iterator doesn't affect a different iterator.
+ {
+ fs::directory_iterator dir_itr( dir );
+ BOOST_TEST( fs::exists(dir_itr->status()) );
+ BOOST_TEST( fs::is_directory(dir_itr->status()) );
+ BOOST_TEST( !fs::is_regular_file(dir_itr->status()) );
+ BOOST_TEST( !fs::is_other(dir_itr->status()) );
+ BOOST_TEST( !fs::is_symlink(dir_itr->status()) );
+
+ fs::directory_iterator dir_itr2( dir );
+ BOOST_TEST( dir_itr->path().filename() == "d1"
+ || dir_itr->path().filename() == "d2" );
+ BOOST_TEST( dir_itr2->path().filename() == "d1" || dir_itr2->path().filename() == "d2" );
+ if ( dir_itr->path().filename() == "d1" )
+ {
+ BOOST_TEST( (++dir_itr)->path().filename() == "d2" );
+ BOOST_TEST( dir_itr2->path().filename() == "d1" );
+ BOOST_TEST( (++dir_itr2)->path().filename() == "d2" );
+ }
+ else
+ {
+ BOOST_TEST( dir_itr->path().filename() == "d2" );
+ BOOST_TEST( (++dir_itr)->path().filename() == "d1" );
+ BOOST_TEST( (dir_itr2)->path().filename() == "d2" );
+ BOOST_TEST( (++dir_itr2)->path().filename() == "d1" );
+ }
+ BOOST_TEST( ++dir_itr == fs::directory_iterator() );
+ BOOST_TEST( dir_itr2 != fs::directory_iterator() );
+ BOOST_TEST( ++dir_itr2 == fs::directory_iterator() );
+ }
+
+ { // *i++ must work to meet the standard's InputIterator requirements
+ fs::directory_iterator dir_itr( dir );
+ BOOST_TEST( dir_itr->path().filename() == "d1"
+ || dir_itr->path().filename() == "d2" );
+ if ( dir_itr->path().filename() == "d1" )
+ {
+ BOOST_TEST( (*dir_itr++).path().filename() == "d1" );
+ BOOST_TEST( dir_itr->path().filename() == "d2" );
+ }
+ else
+ {
+ // Check C++98 input iterator requirements
+ BOOST_TEST( (*dir_itr++).path().filename() == "d2" );
+ // input iterator requirements in the current WP would require this check:
+ // BOOST_TEST( implicit_cast<std::string const&>(*dir_itr++).filename() == "d1" );
+
+ BOOST_TEST( dir_itr->path().filename() == "d1" );
+ }
+
+ // test case reported in comment to SourceForge bug tracker [937606]
+ fs::directory_iterator it( dir );
+ const fs::path p1 = *it++;
+ BOOST_TEST( it != fs::directory_iterator() );
+ const fs::path p2 = *it++;
+ BOOST_TEST( p1 != p2 );
+ BOOST_TEST( it == fs::directory_iterator() );
+ }
+
+ // Windows has a tricky special case when just the root-name is given,
+ // causing the rest of the path to default to the current directory.
+ // Reported as S/F bug [ 1259176 ]
+ if ( platform == "Windows" )
+ {
+ fs::path root_name_path( fs::current_path<fs::path>().root_name() );
+ fs::directory_iterator it( root_name_path );
+ BOOST_TEST( it != fs::directory_iterator() );
+ BOOST_TEST( fs::exists( *it ) );
+ BOOST_TEST( it->path().parent_path() == root_name_path );
+ bool found(false);
+ do
+ {
+ if ( it->path().filename() == temp_dir_name ) found = true;
+ } while ( ++it != fs::directory_iterator() );
+ BOOST_TEST( found );
+ }
+
+ // create an empty file named "f0"
+ fs::path file_ph( dir / "f0");
+ create_file( file_ph, "" );
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( !fs::is_directory( file_ph ) );
+ BOOST_TEST( fs::is_regular_file( file_ph ) );
+ BOOST_TEST( BOOST_FS_IS_EMPTY( file_ph ) );
+ BOOST_TEST( fs::file_size( file_ph ) == 0 );
+ bad_create_directory_path = file_ph;
+ BOOST_TEST( CHECK_EXCEPTION( bad_create_directory, EEXIST ) );
+ stat = fs::status( file_ph );
+ BOOST_TEST( fs::status_known( stat ) );
+ BOOST_TEST( fs::exists( stat ) );
+ BOOST_TEST( !fs::is_directory( stat ) );
+ BOOST_TEST( fs::is_regular_file( stat ) );
+ BOOST_TEST( !fs::is_other( stat ) );
+ BOOST_TEST( !fs::is_symlink( stat ) );
+
+ // create a file named "f1"
+ file_ph = dir / "f1";
+ create_file( file_ph, "foobar1" );
+
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( !fs::is_directory( file_ph ) );
+ BOOST_TEST( fs::is_regular_file( file_ph ) );
+ BOOST_TEST( fs::file_size( file_ph ) == 7 );
+ verify_file( file_ph, "foobar1" );
+
+ // equivalence tests
+ BOOST_TEST( CHECK_EXCEPTION( bad_equivalent, ENOENT ) );
+ BOOST_TEST( fs::equivalent( file_ph, dir / "f1" ) );
+ BOOST_TEST( fs::equivalent( dir, d1 / ".." ) );
+ BOOST_TEST( !fs::equivalent( file_ph, dir ) );
+ BOOST_TEST( !fs::equivalent( dir, file_ph ) );
+ BOOST_TEST( !fs::equivalent( d1, d2 ) );
+ BOOST_TEST( !fs::equivalent( dir, ng ) );
+ BOOST_TEST( !fs::equivalent( ng, dir ) );
+ BOOST_TEST( !fs::equivalent( file_ph, ng ) );
+ BOOST_TEST( !fs::equivalent( ng, file_ph ) );
+
+ // hard link tests
+ fs::path from_ph( dir / "f3" );
+ BOOST_TEST( !fs::exists( from_ph ) );
+ BOOST_TEST( fs::exists( file_ph ) );
+ bool create_hard_link_ok(true);
+ try { fs::create_hard_link( file_ph, from_ph ); }
+ catch ( const fs::filesystem_error & ex )
+ {
+ create_hard_link_ok = false;
+ std::cout
+ << "create_hard_link() attempt failed\n"
+ << "filesystem_error.what() reports: " << ex.what() << '\n'
+ << "create_hard_link() may not be supported on this file system\n";
+ }
+
+ if ( create_hard_link_ok )
+ {
+ std::cout << "create_hard_link(\"" << file_ph << "\", \""
+ << from_ph << "\") succeeded\n";
+ BOOST_TEST( fs::exists( from_ph ) );
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( fs::equivalent( from_ph, file_ph ) );
+ }
+
+ error_code ec;
+ BOOST_TEST( fs::create_hard_link( fs::path("doesnotexist"),
+ fs::path("shouldnotwork"), ec ) );
+ BOOST_TEST( ec );
+
+ // symbolic link tests
+ from_ph = dir / "f4";
+ BOOST_TEST( !fs::exists( from_ph ) );
+ BOOST_TEST( fs::exists( file_ph ) );
+ bool create_symlink_ok(true);
+ try { fs::create_symlink( file_ph, from_ph ); }
+ catch ( const fs::filesystem_error & ex )
+ {
+ create_symlink_ok = false;
+ std::cout
+ << "create_symlink() attempt failed\n"
+ << "filesystem_error.what() reports: " << ex.what() << '\n'
+ << "create_symlink() may not be supported on this file system\n";
+ }
+
+ if ( create_symlink_ok )
+ {
+ std::cout << "create_symlink() succeeded\n";
+ BOOST_TEST( fs::exists( from_ph ) );
+ BOOST_TEST( fs::is_symlink( from_ph ) );
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( fs::equivalent( from_ph, file_ph ) );
+ stat = fs::symlink_status( from_ph );
+ BOOST_TEST( fs::exists( stat ) );
+ BOOST_TEST( !fs::is_directory( stat ) );
+ BOOST_TEST( !fs::is_regular_file( stat ) );
+ BOOST_TEST( !fs::is_other( stat ) );
+ BOOST_TEST( fs::is_symlink( stat ) );
+ }
+
+ ec = error_code();
+ BOOST_TEST( fs::create_symlink( "doesnotexist", "", ec ) );
+ BOOST_TEST( ec );
+
+ // there was an inital bug in directory_iterator that caused premature
+ // close of an OS handle. This block will detect regression.
+ {
+ fs::directory_iterator di;
+ { di = fs::directory_iterator( dir ); }
+ BOOST_TEST( ++di != fs::directory_iterator() );
+ }
+
+ // copy_file() tests
+ std::cout << "begin copy_file test..." << std::endl;
+ fs::copy_file( file_ph, d1 / "f2" );
+ std::cout << "copying complete" << std::endl;
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+ BOOST_TEST( !fs::is_directory( d1 / "f2" ) );
+ verify_file( d1 / "f2", "foobar1" );
+
+ bool copy_ex_ok = false;
+ try { fs::copy_file( file_ph, d1 / "f2" ); }
+ catch ( const fs::filesystem_error & ) { copy_ex_ok = true; }
+ BOOST_TEST( copy_ex_ok );
+
+ copy_ex_ok = false;
+ try { fs::copy_file( file_ph, d1 / "f2", fs::copy_option::fail_if_exists ); }
+ catch ( const fs::filesystem_error & ) { copy_ex_ok = true; }
+ BOOST_TEST( copy_ex_ok );
+
+ copy_ex_ok = true;
+ try { fs::copy_file( file_ph, d1 / "f2", fs::copy_option::overwrite_if_exists ); }
+ catch ( const fs::filesystem_error & ) { copy_ex_ok = false; }
+ BOOST_TEST( copy_ex_ok );
+
+ std::cout << "copy_file test complete" << std::endl;
+
+ // rename() test case numbers refer to operations.htm#rename table
+
+ // [case 1] make sure can't rename() a non-existent file
+ BOOST_TEST( !fs::exists( d1 / "f99" ) );
+ BOOST_TEST( !fs::exists( d1 / "f98" ) );
+ renamer n1a( d1 / "f99", d1 / "f98" );
+ BOOST_TEST( CHECK_EXCEPTION( n1a, ENOENT ) );
+ renamer n1b( fs::path(""), d1 / "f98" );
+ BOOST_TEST( CHECK_EXCEPTION( n1b, ENOENT ) );
+
+ // [case 2] rename() target.empty()
+ renamer n2( file_ph, "" );
+ BOOST_TEST( CHECK_EXCEPTION( n2, ENOENT ) );
+
+ // [case 3] make sure can't rename() to an existent file or directory
+ BOOST_TEST( fs::exists( dir / "f1" ) );
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+ renamer n3a( dir / "f1", d1 / "f2" );
+ BOOST_TEST( CHECK_EXCEPTION( n3a, EEXIST ) );
+ // several POSIX implementations (cygwin, openBSD) report ENOENT instead of EEXIST,
+ // so we don't verify error type on the above test.
+ renamer n3b( dir, d1 );
+ BOOST_TEST( CHECK_EXCEPTION( n3b, 0 ) );
+
+ // [case 4A] can't rename() file to a nonexistent parent directory
+ BOOST_TEST( !fs::is_directory( dir / "f1" ) );
+ BOOST_TEST( !fs::exists( dir / "d3/f3" ) );
+ renamer n4a( dir / "f1", dir / "d3/f3" );
+ BOOST_TEST( CHECK_EXCEPTION( n4a, ENOENT ) );
+
+ // [case 4B] rename() file in same directory
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+ BOOST_TEST( !fs::exists( d1 / "f50" ) );
+ fs::rename( d1 / "f2", d1 / "f50" );
+ BOOST_TEST( !fs::exists( d1 / "f2" ) );
+ BOOST_TEST( fs::exists( d1 / "f50" ) );
+ fs::rename( d1 / "f50", d1 / "f2" );
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+ BOOST_TEST( !fs::exists( d1 / "f50" ) );
+
+ // [case 4C] rename() file d1/f2 to d2/f3
+ fs::rename( d1 / "f2", d2 / "f3" );
+ BOOST_TEST( !fs::exists( d1 / "f2" ) );
+ BOOST_TEST( !fs::exists( d2 / "f2" ) );
+ BOOST_TEST( fs::exists( d2 / "f3" ) );
+ BOOST_TEST( !fs::is_directory( d2 / "f3" ) );
+ verify_file( d2 / "f3", "foobar1" );
+ fs::rename( d2 / "f3", d1 / "f2" );
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+
+ // [case 5A] rename() directory to nonexistent parent directory
+ BOOST_TEST( fs::exists( d1 ) );
+ BOOST_TEST( !fs::exists( dir / "d3/d5" ) );
+ BOOST_TEST( !fs::exists( dir / "d3" ) );
+ renamer n5a( d1, dir / "d3/d5" );
+ BOOST_TEST( CHECK_EXCEPTION( n5a, ENOENT ) );
+
+ // [case 5B] rename() on directory
+ fs::path d3( dir / "d3" );
+ BOOST_TEST( fs::exists( d1 ) );
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+ BOOST_TEST( !fs::exists( d3 ) );
+ fs::rename( d1, d3 );
+ BOOST_TEST( !fs::exists( d1 ) );
+ BOOST_TEST( fs::exists( d3 ) );
+ BOOST_TEST( fs::is_directory( d3 ) );
+ BOOST_TEST( !fs::exists( d1 / "f2" ) );
+ BOOST_TEST( fs::exists( d3 / "f2" ) );
+ fs::rename( d3, d1 );
+ BOOST_TEST( fs::exists( d1 ) );
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+ BOOST_TEST( !fs::exists( d3 ) );
+
+ // [case 5C] rename() rename and move d1 to d2 / "d20"
+ BOOST_TEST( fs::exists( d1 ) );
+ BOOST_TEST( !fs::exists( d2 / "d20" ) );
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+ fs::rename( d1, d2 / "d20" );
+ BOOST_TEST( !fs::exists( d1 ) );
+ BOOST_TEST( fs::exists( d2 / "d20" ) );
+ BOOST_TEST( fs::exists( d2 / "d20" / "f2" ) );
+ fs::rename( d2 / "d20", d1 );
+ BOOST_TEST( fs::exists( d1 ) );
+ BOOST_TEST( !fs::exists( d2 / "d20" ) );
+ BOOST_TEST( fs::exists( d1 / "f2" ) );
+
+ // remove() file
+ file_ph = dir / "shortlife";
+ BOOST_TEST( !fs::exists( file_ph ) );
+ create_file( file_ph, "" );
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( !fs::is_directory( file_ph ) );
+ BOOST_TEST( fs::remove( file_ph ) );
+ BOOST_TEST( !fs::exists( file_ph ) );
+ BOOST_TEST( !fs::remove( "no-such-file" ) );
+ BOOST_TEST( !fs::remove( "no-such-directory/no-such-file" ) );
+
+ // remove() directory
+ d1 = dir / "shortlife_dir";
+ BOOST_TEST( !fs::exists( d1 ) );
+ fs::create_directory( d1 );
+ BOOST_TEST( fs::exists( d1 ) );
+ BOOST_TEST( fs::is_directory( d1 ) );
+ BOOST_TEST( BOOST_FS_IS_EMPTY( d1 ) );
+ bad_remove_dir = dir;
+ BOOST_TEST( CHECK_EXCEPTION( bad_remove, ENOTEMPTY ) );
+ BOOST_TEST( fs::remove( d1 ) );
+ BOOST_TEST( !fs::exists( d1 ) );
+
+ if ( create_symlink_ok ) // only if symlinks supported
+ {
+ // remove() dangling symbolic link
+ fs::path link( "dangling_link" );
+ fs::remove( link ); // remove any residue from past tests
+ BOOST_TEST( !fs::is_symlink( link ) );
+ BOOST_TEST( !fs::exists( link ) );
+ fs::create_symlink( "nowhere", link );
+ BOOST_TEST( !fs::exists( link ) );
+ BOOST_TEST( fs::is_symlink( link ) );
+ BOOST_TEST( fs::remove( link ) );
+ BOOST_TEST( !fs::is_symlink( link ) );
+
+ // remove() self-refering symbolic link
+ link = "link_to_self";
+ fs::remove( link ); // remove any residue from past tests
+ BOOST_TEST( !fs::is_symlink( link ) );
+ BOOST_TEST( !fs::exists( link ) );
+ fs::create_symlink( link, link );
+ BOOST_TEST( fs::remove( link ) );
+ BOOST_TEST( !fs::exists( link ) );
+ BOOST_TEST( !fs::is_symlink( link ) );
+
+ // remove() cyclic symbolic link
+ link = "link_to_a";
+ fs::path link2( "link_to_b" );
+ fs::remove( link ); // remove any residue from past tests
+ fs::remove( link2 ); // remove any residue from past tests
+ BOOST_TEST( !fs::is_symlink( link ) );
+ BOOST_TEST( !fs::exists( link ) );
+ fs::create_symlink( link, link2 );
+ fs::create_symlink( link2, link );
+ BOOST_TEST( fs::remove( link ) );
+ BOOST_TEST( fs::remove( link2 ) );
+ BOOST_TEST( !fs::exists( link ) );
+ BOOST_TEST( !fs::exists( link2 ) );
+ BOOST_TEST( !fs::is_symlink( link ) );
+
+ // remove() symbolic link to file
+ file_ph = "link_target";
+ fs::remove( file_ph ); // remove any residue from past tests
+ BOOST_TEST( !fs::exists( file_ph ) );
+ create_file( file_ph, "" );
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( !fs::is_directory( file_ph ) );
+ BOOST_TEST( fs::is_regular_file( file_ph ) );
+ link = "non_dangling_link";
+ fs::create_symlink( file_ph, link );
+ BOOST_TEST( fs::exists( link ) );
+ BOOST_TEST( !fs::is_directory( link ) );
+ BOOST_TEST( fs::is_regular_file( link ) );
+ BOOST_TEST( fs::is_symlink( link ) );
+ BOOST_TEST( fs::remove( link ) );
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( !fs::exists( link ) );
+ BOOST_TEST( !fs::is_symlink( link ) );
+ BOOST_TEST( fs::remove( file_ph ) );
+ BOOST_TEST( !fs::exists( file_ph ) );
+ }
+
+ // write time tests
+
+ file_ph = dir / "foobar2";
+ create_file( file_ph, "foobar2" );
+ BOOST_TEST( fs::exists( file_ph ) );
+ BOOST_TEST( !fs::is_directory( file_ph ) );
+ BOOST_TEST( fs::is_regular_file( file_ph ) );
+ BOOST_TEST( fs::file_size( file_ph ) == 7 );
+ verify_file( file_ph, "foobar2" );
+
+ // Some file system report last write time as local (FAT), while
+ // others (NTFS) report it as UTC. The C standard does not specify
+ // if time_t is local or UTC.
+
+ std::time_t ft = fs::last_write_time( file_ph );
+ std::cout << "\nUTC last_write_time() for a file just created is "
+ << std::asctime(std::gmtime(&ft)) << std::endl;
+
+ std::tm * tmp = std::localtime( &ft );
+ std::cout << "\nYear is " << tmp->tm_year << std::endl;
+ --tmp->tm_year;
+ std::cout << "Change year to " << tmp->tm_year << std::endl;
+ fs::last_write_time( file_ph, std::mktime( tmp ) );
+ std::time_t ft2 = fs::last_write_time( file_ph );
+ std::cout << "last_write_time() for the file is now "
+ << std::asctime(std::gmtime(&ft2)) << std::endl;
+ BOOST_TEST( ft != fs::last_write_time( file_ph ) );
+
+
+ std::cout << "\nReset to current time" << std::endl;
+ fs::last_write_time( file_ph, ft );
+ double time_diff = std::difftime( ft, fs::last_write_time( file_ph ) );
+ std::cout
+ << "original last_write_time() - current last_write_time() is "
+ << time_diff << " seconds" << std::endl;
+ BOOST_TEST( time_diff >= -60.0 && time_diff <= 60.0 );
+
+ // post-test cleanup
+ BOOST_TEST( fs::remove_all( dir ) != 0 );
+ // above was added just to simplify testing, but it ended up detecting
+ // a bug (failure to close an internal search handle).
+ BOOST_TEST( !fs::exists( dir ) );
+ BOOST_TEST( fs::remove_all( dir ) == 0 );
+
+ return ::boost::report_errors();
+} // main
+
diff --git a/src/third_party/boost/libs/filesystem/v2/test/path_test.cpp b/src/third_party/boost/libs/filesystem/v2/test/path_test.cpp
new file mode 100644
index 00000000000..fb55adb9a94
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/path_test.cpp
@@ -0,0 +1,1380 @@
+// path_test program -------------------------------------------------------//
+
+// Copyright Beman Dawes 2002
+// Copyright Vladimir Prus 2002
+
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+// basic_path's stem(), extension(), and replace_extension() tests are based
+// on basename(), extension(), and change_extension() tests from the original
+// convenience_test.cpp by Vladimir Prus.
+
+#define BOOST_FILESYSTEM_VERSION 2
+
+// See deprecated_test for tests of deprecated features
+#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+# define BOOST_FILESYSTEM_NO_DEPRECATED
+#endif
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#include <boost/filesystem/operations.hpp>
+#include <boost/utility.hpp>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <vector>
+#include <cstring>
+#include <cassert>
+
+namespace fs = boost::filesystem;
+using boost::filesystem::path;
+
+
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/detail/lightweight_main.hpp>
+
+#define PATH_CHECK( a, b ) check( a, b, __LINE__ )
+#define DIR_CHECK( a, b ) check_dir( a, b, __LINE__ )
+#define CHECK_EQUAL( a,b ) check_equal( a, b, __LINE__ )
+
+
+namespace
+{
+ std::string platform( BOOST_PLATFORM );
+
+ void check( const fs::path & source,
+ const std::string & expected, int line )
+ {
+ if ( source.string()== expected ) return;
+
+ ++::boost::detail::test_errors();
+
+ std::cout << '(' << line << ") source.string(): \"" << source.string()
+ << "\" != expected: \"" << expected
+ << "\"" << std::endl;
+ }
+
+ void check_dir( const fs::path & source,
+ const std::string & expected, int line )
+ {
+ if ( source.directory_string()== expected ) return;
+
+ ++::boost::detail::test_errors();
+
+ std::cout << '(' << line << ") source.directory_string(): \""
+ << source.directory_string()
+ << "\" != expected: \"" << expected
+ << "\"" << std::endl;
+ }
+
+ void check_equal( const std::string & value,
+ const std::string & expected, int line )
+ {
+ if ( value == expected ) return;
+
+ ++::boost::detail::test_errors();
+
+ std::cout << '(' << line << ") value: \"" << value
+ << "\" != expected: \"" << expected
+ << "\"" << std::endl;
+ }
+
+
+ void exception_tests()
+ {
+ const std::string str_1("string-1");
+ boost::system::error_code ec( 12345, boost::system::system_category());
+ try { BOOST_FILESYSTEM_THROW( fs::filesystem_error( str_1, ec ) ); }
+ catch ( const fs::filesystem_error & ex )
+ {
+ //std::cout << ex.what() << "*" << std::endl;
+ //BOOST_TEST( std::strcmp( ex.what(),
+ // "string-1: Unknown error" ) == 0 );
+ BOOST_TEST( ex.code() == ec );
+ }
+
+ try { BOOST_FILESYSTEM_THROW( fs::filesystem_error( str_1, "p1", "p2", ec ) ); }
+ catch ( const fs::filesystem_error & ex )
+ {
+ //std::cout << ex.what() << "*" << std::endl;
+ //BOOST_TEST( std::strcmp( ex.what(),
+ // "string-1: Unknown error: \"p1\", \"p2\"" ) == 0 );
+ BOOST_TEST( ex.code() == ec );
+ BOOST_TEST( ex.path1().string() == "p1" );
+ BOOST_TEST( ex.path2().string() == "p2" );
+ }
+ }
+
+
+ // name_function_tests ---------------------------------------------------//
+
+ void name_function_tests()
+ {
+ std::cout << "name_function_tests..." << std::endl;
+
+ BOOST_TEST( fs::portable_posix_name( std::string( "x" ) ) );
+ BOOST_TEST( fs::windows_name( std::string( "x" ) ) );
+ BOOST_TEST( fs::portable_name( std::string( "x" ) ) );
+ BOOST_TEST( fs::portable_directory_name( std::string( "x" ) ) );
+ BOOST_TEST( fs::portable_file_name( std::string( "x" ) ) );
+
+ BOOST_TEST( fs::portable_posix_name( std::string( "." ) ) );
+ BOOST_TEST( fs::windows_name( std::string( "." ) ) );
+ BOOST_TEST( fs::portable_name( std::string( "." ) ) );
+ BOOST_TEST( fs::portable_directory_name( std::string( "." ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( "." ) ) );
+
+ BOOST_TEST( fs::portable_posix_name( std::string( ".." ) ) );
+ BOOST_TEST( fs::windows_name( std::string( ".." ) ) );
+ BOOST_TEST( fs::portable_name( std::string( ".." ) ) );
+ BOOST_TEST( fs::portable_directory_name( std::string( ".." ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( ".." ) ) );
+
+ BOOST_TEST( !fs::native( std::string( "" ) ) );
+ BOOST_TEST( !fs::portable_posix_name( std::string( "" ) ) );
+ BOOST_TEST( !fs::windows_name( std::string( "" ) ) );
+ BOOST_TEST( !fs::portable_name( std::string( "" ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( "" ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( "" ) ) );
+
+ BOOST_TEST( !fs::native( std::string( " " ) ) );
+ BOOST_TEST( !fs::portable_posix_name( std::string( " " ) ) );
+ BOOST_TEST( !fs::windows_name( std::string( " " ) ) );
+ BOOST_TEST( !fs::portable_name( std::string( " " ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( " " ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( " " ) ) );
+
+ BOOST_TEST( !fs::portable_posix_name( std::string( ":" ) ) );
+ BOOST_TEST( !fs::windows_name( std::string( ":" ) ) );
+ BOOST_TEST( !fs::portable_name( std::string( ":" ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( ":" ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( ":" ) ) );
+
+ BOOST_TEST( fs::portable_posix_name( std::string( "-" ) ) );
+ BOOST_TEST( fs::windows_name( std::string( "-" ) ) );
+ BOOST_TEST( !fs::portable_name( std::string( "-" ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( "-" ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( "-" ) ) );
+
+ BOOST_TEST( !fs::portable_posix_name( std::string( "foo bar" ) ) );
+ BOOST_TEST( fs::windows_name( std::string( "foo bar" ) ) );
+ BOOST_TEST( !fs::windows_name( std::string( " bar" ) ) );
+ BOOST_TEST( !fs::windows_name( std::string( "foo " ) ) );
+ BOOST_TEST( !fs::portable_name( std::string( "foo bar" ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( "foo bar" ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( "foo bar" ) ) );
+
+ BOOST_TEST( fs::portable_posix_name( std::string( "foo.bar" ) ) );
+ BOOST_TEST( fs::windows_name( std::string( "foo.bar" ) ) );
+ BOOST_TEST( fs::portable_name( std::string( "foo.bar" ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( "foo.bar" ) ) );
+ BOOST_TEST( fs::portable_file_name( std::string( "foo.bar" ) ) );
+
+ BOOST_TEST( fs::portable_posix_name( std::string( "foo.barf" ) ) );
+ BOOST_TEST( fs::windows_name( std::string( "foo.barf" ) ) );
+ BOOST_TEST( fs::portable_name( std::string( "foo.barf" ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( "foo.barf" ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( "foo.barf" ) ) );
+
+ BOOST_TEST( fs::portable_posix_name( std::string( ".foo" ) ) );
+ BOOST_TEST( fs::windows_name( std::string( ".foo" ) ) );
+ BOOST_TEST( !fs::portable_name( std::string( ".foo" ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( ".foo" ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( ".foo" ) ) );
+
+ BOOST_TEST( fs::portable_posix_name( std::string( "foo." ) ) );
+ BOOST_TEST( !fs::windows_name( std::string( "foo." ) ) );
+ BOOST_TEST( !fs::portable_name( std::string( "foo." ) ) );
+ BOOST_TEST( !fs::portable_directory_name( std::string( "foo." ) ) );
+ BOOST_TEST( !fs::portable_file_name( std::string( "foo." ) ) );
+ }
+
+} // unnamed namespace
+
+int cpp_main( int, char* [] )
+{
+ // The choice of platform is make at runtime rather than compile-time
+ // so that compile errors for all platforms will be detected even though
+ // only the current platform is runtime tested.
+ platform = ( platform == "Win32" || platform == "Win64" || platform == "Cygwin" )
+ ? "Windows"
+ : "POSIX";
+ std::cout << "Platform is " << platform << '\n';
+
+ path p1( "fe/fi/fo/fum" );
+ path p2( p1 );
+ path p3;
+ BOOST_TEST( p1.string() != p3.string() );
+
+ // check each overload
+ BOOST_TEST( p1 != p3 );
+ BOOST_TEST( p1 != p3.string() );
+ BOOST_TEST( p1 != p3.string().c_str() );
+ BOOST_TEST( p1.string() != p3 );
+ BOOST_TEST( p1.string().c_str() != p3 );
+
+ p3 = p2;
+ BOOST_TEST( p1.string() == p3.string() );
+
+ // check each overload
+ BOOST_TEST( p1 == p3 );
+ BOOST_TEST( p1 == p3.string() );
+ BOOST_TEST( p1 == p3.string().c_str() );
+ BOOST_TEST( p1.string() == p3 );
+ BOOST_TEST( p1.string().c_str() == p3 );
+
+ path p4( "foobar" );
+ BOOST_TEST( p4.string() == "foobar" );
+ p4 = p4; // self-assignment
+ BOOST_TEST( p4.string() == "foobar" );
+
+ if ( platform == "Windows" )
+ {
+ path p10 ("c:\\file");
+ path p11 ("c:/file");
+ // check each overload
+ BOOST_TEST( p10.string() == p11.string() );
+ BOOST_TEST( p10 == p11 );
+ BOOST_TEST( p10 == p11.string() );
+ BOOST_TEST( p10 == p11.string().c_str() );
+ BOOST_TEST( p10.string() == p11 );
+ BOOST_TEST( p10.string().c_str() == p11 );
+ BOOST_TEST( p10 == "c:\\file" );
+ BOOST_TEST( p10 == "c:/file" );
+ BOOST_TEST( p11 == "c:\\file" );
+ BOOST_TEST( p11 == "c:/file" );
+ BOOST_TEST( "c:\\file" == p10 );
+ BOOST_TEST( "c:/file" == p10 );
+ BOOST_TEST( "c:\\file" == p11 );
+ BOOST_TEST( "c:/file" == p11 );
+ }
+
+ exception_tests();
+ name_function_tests();
+
+ // These verify various overloads don't cause compiler errors
+
+ fs::exists( p1 );
+ fs::exists( "foo" );
+ fs::exists( std::string( "foo" ) );
+
+ fs::exists( p1 / path( "foo" ) );
+ fs::exists( p1 / "foo" );
+ fs::exists( p1 / std::string( "foo" ) );
+
+ fs::exists( "foo" / p1 );
+ fs::exists( std::string( "foo" ) / p1 );
+
+ p4 /= path( "foo" );
+ p4 /= "foo";
+ p4 /= std::string( "foo" );
+
+ path p5;
+ std::string s1( "//:somestring" );
+
+ // verify deprecated names still available
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+
+ p1.branch_path();
+ p1.leaf();
+ path p_remove_leaf;
+ p_remove_leaf.remove_leaf();
+
+# endif
+
+
+# ifndef BOOST_NO_MEMBER_TEMPLATES
+
+ // check the path member templates
+ p5.assign( s1.begin(), s1.end() );
+
+ PATH_CHECK( p5, "somestring" );
+ p5 = s1;
+ PATH_CHECK( p5, "somestring" );
+
+ BOOST_TEST( p4.string() == path( p4.string().begin(), p4.string().end() ).string() );
+
+ char c0 = 'a';
+ p5.assign( &c0, &c0 );
+ PATH_CHECK( p5, "" );
+ p5 /= "";
+ PATH_CHECK( p5, "" );
+ p5 /= "foo/bar";
+ PATH_CHECK( p5, "foo/bar" );
+ p5.append( &c0, &c0 );
+ PATH_CHECK( p5, "foo/bar" );
+ p5 /= "";
+ PATH_CHECK( p5, "foo/bar" );
+ char bf[]= "bar/foo";
+ p5.assign( bf, bf + sizeof(bf) );
+ PATH_CHECK( p5, bf );
+ p5.append( bf, bf + sizeof(bf) );
+ PATH_CHECK( p5, "bar/foo/bar/foo" );
+
+ // this code, courtesy of David Whetstone, detected a now fixed bug that
+ // derefereced the end iterator (assuming debug build with checked itors)
+ std::vector<char> v1;
+ p5.assign( v1.begin(), v1.end() );
+ std::string s2( v1.begin(), v1.end() );
+ PATH_CHECK( p5, s2 );
+ p5.assign( s1.begin(), s1.begin() + 1 );
+ PATH_CHECK( p5, "/" );
+
+# endif
+ path clear_path( "foo" );
+
+ BOOST_TEST( !clear_path.empty() );
+ clear_path.clear();
+ BOOST_TEST( clear_path.empty() );
+
+ BOOST_TEST( p1 != p4 );
+ BOOST_TEST( p1.string() == p2.string() );
+ BOOST_TEST( p1.string() == p3.string() );
+ BOOST_TEST( path( "foo" ).filename() == "foo" );
+ BOOST_TEST( path( "foo" ).parent_path().string() == "" );
+ BOOST_TEST( p1.filename() == "fum" );
+ BOOST_TEST( p1.parent_path().string() == "fe/fi/fo" );
+ BOOST_TEST( path( "" ).empty() == true );
+ BOOST_TEST( path( "foo" ).empty() == false );
+
+ PATH_CHECK( "", "" );
+
+ PATH_CHECK( "foo", "foo" );
+ PATH_CHECK( "f", "f" );
+
+ PATH_CHECK( "foo/", "foo/" );
+ PATH_CHECK( "f/", "f/" );
+ PATH_CHECK( "foo/..", "foo/.." );
+ PATH_CHECK( "foo/../", "foo/../" );
+ PATH_CHECK( "foo/bar/../..", "foo/bar/../.." );
+ PATH_CHECK( "foo/bar/../../", "foo/bar/../../" );
+ PATH_CHECK( path("") / "foo", "foo" );
+ PATH_CHECK( path("") / "foo/", "foo/" );
+ PATH_CHECK( path("foo") / "", "foo" );
+ PATH_CHECK( path( "/" ), "/" );
+ PATH_CHECK( path( "/" ) / "", "/" );
+ PATH_CHECK( path( "/f" ), "/f" );
+
+ PATH_CHECK( "/foo", "/foo" );
+ PATH_CHECK( path("") / "/foo", "/foo" );
+ PATH_CHECK( path("/foo") / "", "/foo" );
+
+ if ( platform == "Windows" )
+ {
+ PATH_CHECK( path("c:") / "foo", "c:foo" );
+ PATH_CHECK( path("c:") / "/foo", "c:/foo" );
+ }
+
+ if ( platform == "Windows" )
+ {
+ PATH_CHECK( path("c:") / "foo", "c:foo" );
+ PATH_CHECK( path("c:") / "/foo", "c:/foo" );
+ }
+
+ PATH_CHECK( "foo/bar", "foo/bar" );
+ PATH_CHECK( path("foo") / path("bar"), "foo/bar" ); // path arg
+ PATH_CHECK( path("foo") / "bar", "foo/bar" ); // const char * arg
+ PATH_CHECK( path("foo") / path("woo/bar").filename(), "foo/bar" ); // const std::string & arg
+ PATH_CHECK( "foo" / path("bar"), "foo/bar" );
+
+ PATH_CHECK( "a/b", "a/b" ); // probe for length effects
+ PATH_CHECK( path("a") / "b", "a/b" );
+
+ PATH_CHECK( "..", ".." );
+ PATH_CHECK( path("..") / "", ".." );
+ PATH_CHECK( path("") / "..", ".." );
+
+ PATH_CHECK( "../..", "../.." );
+ PATH_CHECK( path("..") / ".." , "../.." );
+
+ PATH_CHECK( "/..", "/.." );
+ PATH_CHECK( path("/") / ".." , "/.." );
+
+ PATH_CHECK( "/../..", "/../.." );
+ PATH_CHECK( path("/..") / ".." , "/../.." );
+
+ PATH_CHECK( "../foo", "../foo" );
+ PATH_CHECK( path("..") / "foo" , "../foo" );
+
+ PATH_CHECK( "foo/..", "foo/.." );
+ PATH_CHECK( path("foo") / ".." , "foo/.." );
+ PATH_CHECK( path( "foo/..bar"), "foo/..bar" );
+
+ PATH_CHECK( "../f", "../f" );
+ PATH_CHECK( path("..") / "f" , "../f" );
+
+ PATH_CHECK( "/../f", "/../f" );
+ PATH_CHECK( path("/..") / "f" , "/../f" );
+
+ PATH_CHECK( "f/..", "f/.." );
+ PATH_CHECK( path("f") / ".." , "f/.." );
+
+ PATH_CHECK( "foo/../..", "foo/../.." );
+ PATH_CHECK( path("foo") / ".." / ".." , "foo/../.." );
+
+ PATH_CHECK( "foo/../../..", "foo/../../.." );
+ PATH_CHECK( path("foo") / ".." / ".." / ".." , "foo/../../.." );
+
+ PATH_CHECK( "foo/../bar", "foo/../bar" );
+ PATH_CHECK( path("foo") / ".." / "bar" , "foo/../bar" );
+
+ PATH_CHECK( "foo/bar/..", "foo/bar/.." );
+ PATH_CHECK( path("foo") / "bar" / ".." , "foo/bar/.." );
+
+ PATH_CHECK( "foo/bar/../..", "foo/bar/../.." );
+ PATH_CHECK( path("foo") / "bar" / ".." / "..", "foo/bar/../.." );
+
+ PATH_CHECK( "foo/bar/../blah", "foo/bar/../blah" );
+ PATH_CHECK( path("foo") / "bar" / ".." / "blah", "foo/bar/../blah" );
+
+ PATH_CHECK( "f/../b", "f/../b" );
+ PATH_CHECK( path("f") / ".." / "b" , "f/../b" );
+
+ PATH_CHECK( "f/b/..", "f/b/.." );
+ PATH_CHECK( path("f") / "b" / ".." , "f/b/.." );
+
+ PATH_CHECK( "f/b/../a", "f/b/../a" );
+ PATH_CHECK( path("f") / "b" / ".." / "a", "f/b/../a" );
+
+ PATH_CHECK( "foo/bar/blah/../..", "foo/bar/blah/../.." );
+ PATH_CHECK( path("foo") / "bar" / "blah" / ".." / "..", "foo/bar/blah/../.." );
+
+ PATH_CHECK( "foo/bar/blah/../../bletch", "foo/bar/blah/../../bletch" );
+ PATH_CHECK( path("foo") / "bar" / "blah" / ".." / ".." / "bletch", "foo/bar/blah/../../bletch" );
+
+ PATH_CHECK( "...", "..." );
+ PATH_CHECK( "....", "...." );
+ PATH_CHECK( "foo/...", "foo/..." );
+ PATH_CHECK( "abc.", "abc." );
+ PATH_CHECK( "abc..", "abc.." );
+ PATH_CHECK( "foo/abc.", "foo/abc." );
+ PATH_CHECK( "foo/abc..", "foo/abc.." );
+
+ PATH_CHECK( path(".abc"), ".abc" );
+ PATH_CHECK( "a.c", "a.c" );
+ PATH_CHECK( path("..abc"), "..abc" );
+ PATH_CHECK( "a..c", "a..c" );
+ PATH_CHECK( path("foo/.abc"), "foo/.abc" );
+ PATH_CHECK( "foo/a.c", "foo/a.c" );
+ PATH_CHECK( path("foo/..abc"), "foo/..abc" );
+ PATH_CHECK( "foo/a..c", "foo/a..c" );
+
+ PATH_CHECK( ".", "." );
+ PATH_CHECK( path("") / ".", "." );
+ PATH_CHECK( "./foo", "./foo" );
+ PATH_CHECK( path(".") / "foo", "./foo" );
+ PATH_CHECK( "./..", "./.." );
+ PATH_CHECK( path(".") / "..", "./.." );
+ PATH_CHECK( "./../foo", "./../foo" );
+ PATH_CHECK( "foo/.", "foo/." );
+ PATH_CHECK( path("foo") / ".", "foo/." );
+ PATH_CHECK( "../.", "../." );
+ PATH_CHECK( path("..") / ".", "../." );
+ PATH_CHECK( "./.", "./." );
+ PATH_CHECK( path(".") / ".", "./." );
+ PATH_CHECK( "././.", "././." );
+ PATH_CHECK( path(".") / "." / ".", "././." );
+ PATH_CHECK( "./foo/.", "./foo/." );
+ PATH_CHECK( path(".") / "foo" / ".", "./foo/." );
+ PATH_CHECK( "foo/./bar", "foo/./bar" );
+ PATH_CHECK( path("foo") / "." / "bar", "foo/./bar" );
+ PATH_CHECK( "foo/./.", "foo/./." );
+ PATH_CHECK( path("foo") / "." / ".", "foo/./." );
+ PATH_CHECK( "foo/./..", "foo/./.." );
+ PATH_CHECK( path("foo") / "." / "..", "foo/./.." );
+ PATH_CHECK( "foo/./../bar", "foo/./../bar" );
+ PATH_CHECK( "foo/../.", "foo/../." );
+ PATH_CHECK( path(".") / "." / "..", "././.." );
+ PATH_CHECK( "././..", "././.." );
+ PATH_CHECK( path(".") / "." / "..", "././.." );
+ PATH_CHECK( "./../.", "./../." );
+ PATH_CHECK( path(".") / ".." / ".", "./../." );
+ PATH_CHECK( ".././.", ".././." );
+ PATH_CHECK( path("..") / "." / ".", ".././." );
+
+ // iterator tests
+
+ path itr_ck = "";
+ path::const_iterator itr = itr_ck.begin();
+ BOOST_TEST( itr == itr_ck.end() );
+
+ itr_ck = "/";
+ itr = itr_ck.begin();
+ BOOST_TEST( *itr == std::string( "/" ) );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ BOOST_TEST( *--itr == std::string( "/" ) );
+
+ itr_ck = "foo";
+ BOOST_TEST( *itr_ck.begin() == std::string( "foo" ) );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
+
+ itr_ck = path( "/foo" );
+ BOOST_TEST( *itr_ck.begin() == std::string( "/" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "foo" ) );
+ BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == boost::prior( itr_ck.end() ) );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "/" ) );
+ BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
+
+ itr_ck = "/foo/bar";
+ itr = itr_ck.begin();
+ BOOST_TEST( *itr == std::string( "/" ) );
+ BOOST_TEST( *++itr == std::string( "foo" ) );
+ BOOST_TEST( *++itr == std::string( "bar" ) );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "bar" );
+ CHECK_EQUAL( *--itr, "foo" );
+ CHECK_EQUAL( *--itr, "/" );
+
+ itr_ck = "../f"; // previously failed due to short name bug
+ itr = itr_ck.begin();
+ CHECK_EQUAL( *itr, ".." );
+ CHECK_EQUAL( *++itr, "f" );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "f" );
+ CHECK_EQUAL( *--itr, ".." );
+
+ // POSIX says treat "/foo/bar/" as "/foo/bar/."
+ itr_ck = "/foo/bar/";
+ itr = itr_ck.begin();
+ CHECK_EQUAL( *itr, "/" );
+ CHECK_EQUAL( *++itr, "foo" );
+ CHECK_EQUAL( *++itr, "bar" );
+ CHECK_EQUAL( *++itr, "." );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "." );
+ CHECK_EQUAL( *--itr, "bar" );
+ CHECK_EQUAL( *--itr, "foo" );
+ CHECK_EQUAL( *--itr, "/" );
+
+ // POSIX says treat "/f/b/" as "/f/b/."
+ itr_ck = "/f/b/";
+ itr = itr_ck.begin();
+ CHECK_EQUAL( *itr, "/" );
+ CHECK_EQUAL( *++itr, "f" );
+ CHECK_EQUAL( *++itr, "b" );
+ CHECK_EQUAL( *++itr, "." );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "." );
+ CHECK_EQUAL( *--itr, "b" );
+ CHECK_EQUAL( *--itr, "f" );
+ CHECK_EQUAL( *--itr, "/" );
+
+ itr_ck = "//net";
+ itr = itr_ck.begin();
+ // two leading slashes are permitted by POSIX (as implementation defined),
+ // while for Windows it is always well defined (as a network name)
+ CHECK_EQUAL( *itr, "//net" );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "//net" );
+
+ itr_ck = "//net/";
+ itr = itr_ck.begin();
+ CHECK_EQUAL( *itr, "//net" );
+ CHECK_EQUAL( *++itr, "/" );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "/" );
+ CHECK_EQUAL( *--itr, "//net" );
+
+ itr_ck = "//foo///bar///";
+ itr = itr_ck.begin();
+ CHECK_EQUAL( *itr, "//foo" );
+ CHECK_EQUAL( *++itr, "/" );
+ CHECK_EQUAL( *++itr, "bar" );
+ CHECK_EQUAL( *++itr, "." );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "." );
+ CHECK_EQUAL( *--itr, "bar" );
+ CHECK_EQUAL( *--itr, "/" );
+ CHECK_EQUAL( *--itr, "//foo" );
+
+ itr_ck = "///foo///bar///";
+ itr = itr_ck.begin();
+ // three or more leading slashes are to be treated as a single slash
+ CHECK_EQUAL( *itr, "/" );
+ CHECK_EQUAL( *++itr, "foo" );
+ CHECK_EQUAL( *++itr, "bar" );
+ CHECK_EQUAL( *++itr, "." );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "." );
+ CHECK_EQUAL( *--itr, "bar" );
+ CHECK_EQUAL( *--itr, "foo" );
+ CHECK_EQUAL( *--itr, "/" );
+
+ if ( platform == "Windows" )
+ {
+ itr_ck = "c:/";
+ itr = itr_ck.begin();
+ CHECK_EQUAL( *itr, "c:" );
+ CHECK_EQUAL( *++itr, "/" );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ CHECK_EQUAL( *--itr, "/" );
+ CHECK_EQUAL( *--itr, "c:" );
+
+ itr_ck = "c:/foo";
+ itr = itr_ck.begin();
+ BOOST_TEST( *itr == std::string( "c:" ) );
+ BOOST_TEST( *++itr == std::string( "/" ) );
+ BOOST_TEST( *++itr == std::string( "foo" ) );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ BOOST_TEST( *--itr == std::string( "foo" ) );
+ BOOST_TEST( *--itr == std::string( "/" ) );
+ BOOST_TEST( *--itr == std::string( "c:" ) );
+
+ itr_ck = "c:foo";
+ itr = itr_ck.begin();
+ BOOST_TEST( *itr == std::string( "c:" ) );
+ BOOST_TEST( *++itr == std::string( "foo" ) );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ BOOST_TEST( *--itr == std::string( "foo" ) );
+ BOOST_TEST( *--itr == std::string( "c:" ) );
+
+ itr_ck = "c:foo/";
+ itr = itr_ck.begin();
+ BOOST_TEST( *itr == std::string( "c:" ) );
+ BOOST_TEST( *++itr == std::string( "foo" ) );
+ BOOST_TEST( *++itr == std::string( "." ) );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ BOOST_TEST( *--itr == std::string( "." ) );
+ BOOST_TEST( *--itr == std::string( "foo" ) );
+ BOOST_TEST( *--itr == std::string( "c:" ) );
+ }
+ else
+ {
+ itr_ck = "///";
+ itr = itr_ck.begin();
+ CHECK_EQUAL( *itr, "/" );
+ BOOST_TEST( ++itr == itr_ck.end() );
+ }
+
+ path p;
+
+ p = "";
+ BOOST_TEST( p.relative_path().string() == "" );
+ BOOST_TEST( p.parent_path().string() == "" );
+ BOOST_TEST( p.filename() == "" );
+ BOOST_TEST( p.root_name() == "" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "" );
+ BOOST_TEST( !p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( !p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = "/";
+ BOOST_TEST( p.relative_path().string() == "" );
+ BOOST_TEST( p.parent_path().string() == "" );
+ BOOST_TEST( p.filename() == "/" );
+ BOOST_TEST( p.root_name() == "" );
+ BOOST_TEST( p.root_directory() == "/" );
+ BOOST_TEST( p.root_path().string() == "/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ if ( platform == "POSIX" )
+ BOOST_TEST( p.is_complete() );
+ else
+ BOOST_TEST( !p.is_complete() );
+
+ p = "//";
+ CHECK_EQUAL( p.relative_path().string(), "" );
+ CHECK_EQUAL( p.parent_path().string(), "" );
+ CHECK_EQUAL( p.filename(), "//" );
+ CHECK_EQUAL( p.root_name(), "//" );
+ CHECK_EQUAL( p.root_directory(), "" );
+ CHECK_EQUAL( p.root_path().string(), "//" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+
+ p = "///";
+ CHECK_EQUAL( p.relative_path().string(), "" );
+ CHECK_EQUAL( p.parent_path().string(), "" );
+ CHECK_EQUAL( p.filename(), "/" );
+ CHECK_EQUAL( p.root_name(), "" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ if ( platform == "POSIX" )
+ BOOST_TEST( p.is_complete() );
+ else
+ BOOST_TEST( !p.is_complete() );
+
+ p = ".";
+ BOOST_TEST( p.relative_path().string() == "." );
+ BOOST_TEST( p.parent_path().string() == "" );
+ BOOST_TEST( p.filename() == "." );
+ BOOST_TEST( p.root_name() == "" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "" );
+ BOOST_TEST( !p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = "..";
+ BOOST_TEST( p.relative_path().string() == ".." );
+ BOOST_TEST( p.parent_path().string() == "" );
+ BOOST_TEST( p.filename() == ".." );
+ BOOST_TEST( p.root_name() == "" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "" );
+ BOOST_TEST( !p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = "foo";
+ BOOST_TEST( p.relative_path().string() == "foo" );
+ BOOST_TEST( p.parent_path().string() == "" );
+ BOOST_TEST( p.filename() == "foo" );
+ BOOST_TEST( p.root_name() == "" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "" );
+ BOOST_TEST( !p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = "/foo";
+ CHECK_EQUAL( p.relative_path().string(), "foo" );
+ CHECK_EQUAL( p.parent_path().string(), "/" );
+ CHECK_EQUAL( p.filename(), "foo" );
+ CHECK_EQUAL( p.root_name(), "" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ if ( platform == "POSIX" )
+ BOOST_TEST( p.is_complete() );
+ else
+ BOOST_TEST( !p.is_complete() );
+
+ p = "/foo/";
+ CHECK_EQUAL( p.relative_path().string(), "foo/" );
+ CHECK_EQUAL( p.parent_path().string(), "/foo" );
+ CHECK_EQUAL( p.filename(), "." );
+ CHECK_EQUAL( p.root_name(), "" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ if ( platform == "POSIX" )
+ BOOST_TEST( p.is_complete() );
+ else
+ BOOST_TEST( !p.is_complete() );
+
+ p = "///foo";
+ CHECK_EQUAL( p.relative_path().string(), "foo" );
+ CHECK_EQUAL( p.parent_path().string(), "/" );
+ CHECK_EQUAL( p.filename(), "foo" );
+ CHECK_EQUAL( p.root_name(), "" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ if ( platform == "POSIX" )
+ BOOST_TEST( p.is_complete() );
+ else
+ BOOST_TEST( !p.is_complete() );
+
+ p = "foo/bar";
+ BOOST_TEST( p.relative_path().string() == "foo/bar" );
+ BOOST_TEST( p.parent_path().string() == "foo" );
+ BOOST_TEST( p.filename() == "bar" );
+ BOOST_TEST( p.root_name() == "" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "" );
+ BOOST_TEST( !p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = "../foo";
+ BOOST_TEST( p.relative_path().string() == "../foo" );
+ BOOST_TEST( p.parent_path().string() == ".." );
+ BOOST_TEST( p.filename() == "foo" );
+ BOOST_TEST( p.root_name() == "" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "" );
+ BOOST_TEST( !p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = "..///foo";
+ CHECK_EQUAL( p.relative_path().string(), "..///foo" );
+ CHECK_EQUAL( p.parent_path().string(), ".." );
+ CHECK_EQUAL( p.filename(), "foo" );
+ CHECK_EQUAL( p.root_name(), "" );
+ CHECK_EQUAL( p.root_directory(), "" );
+ CHECK_EQUAL( p.root_path().string(), "" );
+ BOOST_TEST( !p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = "/foo/bar";
+ BOOST_TEST( p.relative_path().string() == "foo/bar" );
+ BOOST_TEST( p.parent_path().string() == "/foo" );
+ BOOST_TEST( p.filename() == "bar" );
+ BOOST_TEST( p.root_name() == "" );
+ BOOST_TEST( p.root_directory() == "/" );
+ BOOST_TEST( p.root_path().string() == "/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( !p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ if ( platform == "POSIX" )
+ BOOST_TEST( p.is_complete() );
+ else
+ BOOST_TEST( !p.is_complete() );
+
+ // Both POSIX and Windows allow two leading slashs
+ // (POSIX meaning is implementation defined)
+ PATH_CHECK( path( "//resource" ), "//resource" );
+ PATH_CHECK( path( "//resource/" ), "//resource/" );
+ PATH_CHECK( path( "//resource/foo" ), "//resource/foo" );
+
+ p = path( "//net" );
+ CHECK_EQUAL( p.string(), "//net" );
+ CHECK_EQUAL( p.relative_path().string(), "" );
+ CHECK_EQUAL( p.parent_path().string(), "" );
+ CHECK_EQUAL( p.filename(), "//net" );
+ CHECK_EQUAL( p.root_name(), "//net" );
+ CHECK_EQUAL( p.root_directory(), "" );
+ CHECK_EQUAL( p.root_path().string(), "//net" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = path( "//net/" );
+ BOOST_TEST( p.relative_path().string() == "" );
+ BOOST_TEST( p.parent_path().string() == "//net" );
+ BOOST_TEST( p.filename() == "/" );
+ BOOST_TEST( p.root_name() == "//net" );
+ BOOST_TEST( p.root_directory() == "/" );
+ BOOST_TEST( p.root_path().string() == "//net/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( p.is_complete() );
+
+ p = path( "//net/foo" );
+ BOOST_TEST( p.relative_path().string() == "foo" );
+ BOOST_TEST( p.parent_path().string() == "//net/" );
+ BOOST_TEST( p.filename() == "foo" );
+ BOOST_TEST( p.root_name() == "//net" );
+ BOOST_TEST( p.root_directory() == "/" );
+ BOOST_TEST( p.root_path().string() == "//net/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( p.is_complete() );
+
+ p = path( "//net///foo" );
+ CHECK_EQUAL( p.relative_path().string(), "foo" );
+ CHECK_EQUAL( p.parent_path().string(), "//net/" );
+ CHECK_EQUAL( p.filename(), "foo" );
+ CHECK_EQUAL( p.root_name(), "//net" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "//net/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( p.is_complete() );
+
+ if ( platform == "Windows" )
+ {
+ DIR_CHECK( path( "/foo/bar/" ), "\\foo\\bar\\" );
+ DIR_CHECK( path( "//foo//bar//" ), "\\\\foo\\bar\\\\" );
+ DIR_CHECK( path( "///foo///bar///" ), "\\foo\\\\\\bar\\\\\\" );
+
+ DIR_CHECK( path( "\\/foo\\/bar\\/" ), "\\\\foo\\bar\\\\" );
+ DIR_CHECK( path( "\\//foo\\//bar\\//" ), "\\foo\\\\\\bar\\\\\\" );
+
+
+ DIR_CHECK( path( "\\foo\\bar\\" ), "\\foo\\bar\\" );
+ DIR_CHECK( path( "\\\\foo\\\\bar\\\\" ), "\\\\foo\\bar\\\\" );
+ DIR_CHECK( path( "\\\\\\foo\\\\\\bar\\\\\\" ), "\\foo\\\\\\bar\\\\\\" );
+
+ PATH_CHECK( path( "\\" ), "/" );
+ PATH_CHECK( path( "\\f" ), "/f" );
+ PATH_CHECK( path( "\\foo" ), "/foo" );
+ PATH_CHECK( path( "foo\\bar" ), "foo/bar" );
+ PATH_CHECK( path( "foo bar" ), "foo bar" );
+ PATH_CHECK( path( "c:" ), "c:" );
+ PATH_CHECK( path( "c:/" ), "c:/" );
+ PATH_CHECK( path( "c:." ), "c:." );
+ PATH_CHECK( path( "c:./foo" ), "c:./foo" );
+ PATH_CHECK( path( "c:.\\foo" ), "c:./foo" );
+ PATH_CHECK( path( "c:.." ), "c:.." );
+ PATH_CHECK( path( "c:/." ), "c:/." );
+ PATH_CHECK( path( "c:/.." ), "c:/.." );
+ PATH_CHECK( path( "c:/../" ), "c:/../" );
+ PATH_CHECK( path( "c:\\..\\" ), "c:/../" );
+ PATH_CHECK( path( "c:/../.." ), "c:/../.." );
+ PATH_CHECK( path( "c:/../foo" ), "c:/../foo" );
+ PATH_CHECK( path( "c:\\..\\foo" ), "c:/../foo" );
+ PATH_CHECK( path( "c:../foo" ), "c:../foo" );
+ PATH_CHECK( path( "c:..\\foo" ), "c:../foo" );
+ PATH_CHECK( path( "c:/../../foo" ), "c:/../../foo" );
+ PATH_CHECK( path( "c:\\..\\..\\foo" ), "c:/../../foo" );
+ PATH_CHECK( path( "c:foo/.." ), "c:foo/.." );
+ PATH_CHECK( path( "c:/foo/.." ), "c:/foo/.." );
+ PATH_CHECK( path( "c:/..foo" ), "c:/..foo" );
+ PATH_CHECK( path( "c:foo" ), "c:foo" );
+ PATH_CHECK( path( "c:/foo" ), "c:/foo" );
+ PATH_CHECK( path( "\\\\netname" ), "//netname" );
+ PATH_CHECK( path( "\\\\netname\\" ), "//netname/" );
+ PATH_CHECK( path( "\\\\netname\\foo" ), "//netname/foo" );
+ PATH_CHECK( path( "c:/foo" ), "c:/foo" );
+ PATH_CHECK( path( "prn:" ), "prn:" );
+
+ p = path( "c:" );
+ BOOST_TEST( p.relative_path().string() == "" );
+ BOOST_TEST( p.parent_path().string() == "" );
+ BOOST_TEST( p.filename() == "c:" );
+ BOOST_TEST( p.root_name() == "c:" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "c:" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = path( "c:foo" );
+ BOOST_TEST( p.relative_path().string() == "foo" );
+ BOOST_TEST( p.parent_path().string() == "c:" );
+ BOOST_TEST( p.filename() == "foo" );
+ BOOST_TEST( p.root_name() == "c:" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "c:" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = path( "c:/" );
+ BOOST_TEST( p.relative_path().string() == "" );
+ BOOST_TEST( p.parent_path().string() == "c:" );
+ BOOST_TEST( p.filename() == "/" );
+ BOOST_TEST( p.root_name() == "c:" );
+ BOOST_TEST( p.root_directory() == "/" );
+ BOOST_TEST( p.root_path().string() == "c:/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( p.is_complete() );
+
+ p = path( "c:.." );
+ BOOST_TEST( p.relative_path().string() == ".." );
+ BOOST_TEST( p.parent_path().string() == "c:" );
+ BOOST_TEST( p.filename() == ".." );
+ BOOST_TEST( p.root_name() == "c:" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "c:" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = path( "c:/foo" );
+ CHECK_EQUAL( p.relative_path().string(), "foo" );
+ CHECK_EQUAL( p.parent_path().string(), "c:/" );
+ CHECK_EQUAL( p.filename(), "foo" );
+ CHECK_EQUAL( p.root_name(), "c:" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "c:/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( p.is_complete() );
+
+ p = path( "c://foo" );
+ CHECK_EQUAL( p.relative_path().string(), "foo" );
+ CHECK_EQUAL( p.parent_path().string(), "c:/" );
+ CHECK_EQUAL( p.filename(), "foo" );
+ CHECK_EQUAL( p.root_name(), "c:" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "c:/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( p.is_complete() );
+
+ p = path( "c:\\foo\\bar" );
+ CHECK_EQUAL( p.relative_path().string(), "foo/bar" );
+ CHECK_EQUAL( p.parent_path().string(), "c:/foo" );
+ CHECK_EQUAL( p.filename(), "bar" );
+ CHECK_EQUAL( p.root_name(), "c:" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "c:/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( p.is_complete() );
+
+ p = path( "prn:" );
+ BOOST_TEST( p.relative_path().string() == "" );
+ BOOST_TEST( p.parent_path().string() == "" );
+ BOOST_TEST( p.filename() == "prn:" );
+ BOOST_TEST( p.root_name() == "prn:" );
+ BOOST_TEST( p.root_directory() == "" );
+ BOOST_TEST( p.root_path().string() == "prn:" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( !p.has_root_directory() );
+ BOOST_TEST( !p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( !p.has_parent_path() );
+ BOOST_TEST( !p.is_complete() );
+
+ p = path( "\\\\net\\\\\\foo" );
+ CHECK_EQUAL( p.relative_path().string(), "foo" );
+ CHECK_EQUAL( p.parent_path().string(), "//net/" );
+ CHECK_EQUAL( p.filename(), "foo" );
+ CHECK_EQUAL( p.root_name(), "//net" );
+ CHECK_EQUAL( p.root_directory(), "/" );
+ CHECK_EQUAL( p.root_path().string(), "//net/" );
+ BOOST_TEST( p.has_root_path() );
+ BOOST_TEST( p.has_root_name() );
+ BOOST_TEST( p.has_root_directory() );
+ BOOST_TEST( p.has_relative_path() );
+ BOOST_TEST( p.has_filename() );
+ BOOST_TEST( p.has_parent_path() );
+ BOOST_TEST( p.is_complete() );
+
+ itr_ck = path( "c:" );
+ BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
+ BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "c:" ) );
+
+ itr_ck = path( "c:/" );
+ BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
+ BOOST_TEST( boost::next( boost::next( itr_ck.begin() )) == itr_ck.end() );
+ BOOST_TEST( boost::prior( boost::prior( itr_ck.end() )) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "/" ) );
+ BOOST_TEST( *boost::prior( boost::prior( itr_ck.end() )) == std::string( "c:" ) );
+
+ itr_ck = path( "c:foo" );
+ BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "foo" ) );
+ BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
+ BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "c:" ) );
+
+ itr_ck = path( "c:/foo" );
+ BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
+ BOOST_TEST( *boost::next( boost::next( itr_ck.begin() )) == std::string( "foo" ) );
+ BOOST_TEST( boost::next( boost::next( boost::next( itr_ck.begin() ))) == itr_ck.end() );
+ BOOST_TEST( boost::prior( boost::prior( boost::prior( itr_ck.end() ))) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( *boost::prior( boost::prior( itr_ck.end() )) == std::string( "/" ) );
+ BOOST_TEST( *boost::prior( boost::prior( boost::prior( itr_ck.end() ))) == std::string( "c:" ) );
+
+ itr_ck = path( "//net" );
+ BOOST_TEST( *itr_ck.begin() == std::string( "//net" ) );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
+ BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "//net" ) );
+
+ itr_ck = path( "//net/" );
+ CHECK_EQUAL( *itr_ck.begin(), "//net" );
+ CHECK_EQUAL( *boost::next( itr_ck.begin() ), "/" );
+ BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
+ BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
+ CHECK_EQUAL( *boost::prior( itr_ck.end() ), "/" );
+ CHECK_EQUAL( *boost::prior(boost::prior( itr_ck.end() )), "//net" );
+
+ itr_ck = path( "//net/foo" );
+ BOOST_TEST( *itr_ck.begin() == std::string( "//net" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
+ BOOST_TEST( *boost::next(boost::next( itr_ck.begin() )) == std::string( "foo" ) );
+ BOOST_TEST( boost::next(boost::next(boost::next( itr_ck.begin() ))) == itr_ck.end() );
+ BOOST_TEST( boost::prior(boost::prior(boost::prior( itr_ck.end() ))) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "/" ) );
+ BOOST_TEST( *boost::prior(boost::prior(boost::prior( itr_ck.end() ))) == std::string( "//net" ) );
+
+ itr_ck = path( "prn:" );
+ BOOST_TEST( *itr_ck.begin() == std::string( "prn:" ) );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
+ BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "prn:" ) );
+ } // Windows
+
+ else
+ { // POSIX
+ DIR_CHECK( path( "/foo/bar/" ), "/foo/bar/" );
+ DIR_CHECK( path( "//foo//bar//" ), "//foo//bar//" );
+ DIR_CHECK( path( "///foo///bar///" ), "///foo///bar///" );
+
+ p = path( "/usr/local/bin:/usr/bin:/bin" );
+ BOOST_TEST( p.file_string() == "/usr/local/bin:/usr/bin:/bin" );
+ } // POSIX
+
+ // test non-member functions, particularly operator overloads
+
+ path e, e2;
+ std::string es, es2;
+ char ecs[] = "";
+ char ecs2[] = "";
+
+ char acs[] = "a";
+ std::string as(acs);
+ path a( as );
+
+ char acs2[] = "a";
+ std::string as2(acs2);
+ path a2( as2 );
+
+ char bcs[] = "b";
+ std::string bs(bcs);
+ path b( bs );
+
+ // swap
+ a.swap( b );
+ BOOST_TEST( a.string() == "b" );
+ BOOST_TEST( b.string() == "a" );
+ fs::swap( a, b );
+ BOOST_TEST( a.string() == "a" );
+ BOOST_TEST( b.string() == "b" );
+
+ // probe operator /
+ BOOST_TEST( (b / a).string() == "b/a" );
+ BOOST_TEST( (bs / a).string() == "b/a" );
+ BOOST_TEST( (bcs / a).string() == "b/a" );
+ BOOST_TEST( (b / as).string() == "b/a" );
+ BOOST_TEST( (b / acs).string() == "b/a" );
+
+ // probe operator <
+ BOOST_TEST( !(e < e2) );
+ BOOST_TEST( !(es < e2) );
+ BOOST_TEST( !(ecs < e2) );
+ BOOST_TEST( !(e < es2) );
+ BOOST_TEST( !(e < ecs2) );
+
+ BOOST_TEST( e < a );
+ BOOST_TEST( es < a );
+ BOOST_TEST( ecs < a );
+ BOOST_TEST( e < as );
+ BOOST_TEST( e < acs );
+
+ BOOST_TEST( a < b );
+ BOOST_TEST( as < b );
+ BOOST_TEST( acs < b );
+ BOOST_TEST( a < bs );
+ BOOST_TEST( a < bcs );
+
+ BOOST_TEST( !(a < a2) );
+ BOOST_TEST( !(as < a2) );
+ BOOST_TEST( !(acs < a2) );
+ BOOST_TEST( !(a < as2) );
+ BOOST_TEST( !(a < acs2) );
+
+ // make sure basic_path overloads don't conflict with std::string overloads
+
+ BOOST_TEST( !(as < as) );
+ BOOST_TEST( !(as < acs) );
+ BOOST_TEST( !(acs < as) );
+
+ // reality check character set is as expected
+ BOOST_TEST( std::string("a.b") < std::string("a/b") );
+ // verify compare is actually lexicographical
+ BOOST_TEST( path("a/b") < path("a.b") );
+
+ // make sure the derivative operators also work
+ BOOST_TEST( a == a2 );
+ BOOST_TEST( as == a2 );
+ BOOST_TEST( acs == a2 );
+ BOOST_TEST( a == as2 );
+ BOOST_TEST( a == acs2 );
+
+ BOOST_TEST( a != b );
+ BOOST_TEST( as != b );
+ BOOST_TEST( acs != b );
+ BOOST_TEST( a != bs );
+ BOOST_TEST( a != bcs );
+
+ BOOST_TEST( b > a );
+ BOOST_TEST( b > as );
+ BOOST_TEST( b > acs );
+ BOOST_TEST( bs > a);
+ BOOST_TEST( bcs > a);
+
+ BOOST_TEST( !(a2 > a) );
+ BOOST_TEST( !(a2 > as) );
+ BOOST_TEST( !(a2 > acs) );
+ BOOST_TEST( !(as2 > a) );
+ BOOST_TEST( !(acs2 > a) );
+
+ BOOST_TEST( a <= b );
+ BOOST_TEST( as <= b );
+ BOOST_TEST( acs <= b );
+ BOOST_TEST( a <= bs );
+ BOOST_TEST( a <= bcs );
+
+ BOOST_TEST( a <= a2 );
+ BOOST_TEST( as <= a2 );
+ BOOST_TEST( acs <= a2 );
+ BOOST_TEST( a <= as2 );
+ BOOST_TEST( a <= acs2 );
+
+ BOOST_TEST( b >= a );
+ BOOST_TEST( bs >= a );
+ BOOST_TEST( bcs >= a );
+ BOOST_TEST( b >= as );
+ BOOST_TEST( b >= acs );
+
+ BOOST_TEST( a2 >= a );
+ BOOST_TEST( as2 >= a );
+ BOOST_TEST( acs2 >= a );
+ BOOST_TEST( a2 >= as );
+ BOOST_TEST( a2 >= acs );
+
+// extension() tests
+
+ BOOST_TEST( path("a/b").extension() == "" );
+ BOOST_TEST( path("a.b/c").extension() == "" );
+ BOOST_TEST( path("a/b.txt").extension() == ".txt" );
+ BOOST_TEST( path("a/b.").extension() == "." );
+ BOOST_TEST( path("a.b.c").extension() == ".c" );
+ BOOST_TEST( path("a.b.c.").extension() == "." );
+ BOOST_TEST( path("").extension() == "" );
+ BOOST_TEST( path("a/").extension() == "." );
+
+// stem() tests
+
+ BOOST_TEST( path("b").stem() == "b" );
+ BOOST_TEST( path("a/b.txt").stem() == "b" );
+ BOOST_TEST( path("a/b.").stem() == "b" );
+ BOOST_TEST( path("a.b.c").stem() == "a.b" );
+ BOOST_TEST( path("a.b.c.").stem() == "a.b.c" );
+ BOOST_TEST( path("").stem() == "" );
+
+// replace_extension() tests
+
+ BOOST_TEST( path("a.txt").replace_extension("").string() == "a" );
+ BOOST_TEST( path("a.txt").replace_extension(".").string() == "a." );
+ BOOST_TEST( path("a.txt").replace_extension(".tex").string() == "a.tex" );
+ BOOST_TEST( path("a.txt").replace_extension("tex").string() == "a.tex" );
+ BOOST_TEST( path("a.").replace_extension(".tex").string() == "a.tex" );
+ BOOST_TEST( path("a.").replace_extension("tex").string() == "a.tex" );
+ BOOST_TEST( path("a").replace_extension(".txt").string() == "a.txt" );
+ BOOST_TEST( path("a").replace_extension("txt").string() == "a.txt" );
+ BOOST_TEST( path("a.b.txt" ).replace_extension(".tex").string() == "a.b.tex" );
+ BOOST_TEST( path("a.b.txt" ).replace_extension("tex").string() == "a.b.tex" );
+ // see the rationale in html docs for explanation why this works
+ BOOST_TEST( path("").replace_extension(".png").string() == ".png" );
+ BOOST_TEST_EQ(path("a.txt/b").replace_extension(".c"), "a.txt/b.c"); // ticket 4702
+
+ // inserter and extractor tests
+# if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300 // bypass VC++ 7.0 and earlier
+ std::cout << "\nInserter and extractor test...";
+ std::stringstream ss;
+ ss << fs::path( "foo bar" ) << std::endl; // ensure space in path roundtrips
+ fs::path round_trip;
+ ss >> round_trip;
+ BOOST_TEST( round_trip.string() == "foo bar" );
+ std::cout << round_trip.string() << "..." << round_trip << " complete\n";
+# endif
+
+ return ::boost::report_errors();
+}
diff --git a/src/third_party/boost/libs/filesystem/v2/test/wide_test.cpp b/src/third_party/boost/libs/filesystem/v2/test/wide_test.cpp
new file mode 100644
index 00000000000..1d1b7b05383
--- /dev/null
+++ b/src/third_party/boost/libs/filesystem/v2/test/wide_test.cpp
@@ -0,0 +1,169 @@
+// Boost wide_test.cpp -----------------------------------------------------//
+
+// Copyright Beman Dawes 2005
+
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+#define BOOST_FILESYSTEM_VERSION 2
+
+#include <boost/config/warning_disable.hpp>
+
+// See deprecated_test for tests of deprecated features
+#ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+# define BOOST_FILESYSTEM_NO_DEPRECATED
+#endif
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#include <boost/filesystem/config.hpp>
+# ifdef BOOST_FILESYSTEM2_NARROW_ONLY
+# error This compiler or standard library does not support wide-character strings or paths
+# endif
+
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/detail/lightweight_main.hpp>
+
+#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
+
+namespace fs = boost::filesystem;
+
+#include <iostream>
+#include <iomanip>
+#include <ios>
+#include <string>
+#include <cerrno>
+
+#include "lpath.hpp"
+
+namespace
+{
+ bool cleanup = true;
+
+ template< class Path >
+ void create_file( const Path & ph, const std::string & contents )
+ {
+ // TODO: why missing symbol error on Darwin
+# ifndef __APPLE__
+ fs::ofstream f( ph );
+# else
+ std::ofstream f( ph.external_file_string().c_str() );
+# endif
+ if ( !f )
+ BOOST_FILESYSTEM_THROW( fs::basic_filesystem_error<Path>( "wide_test create_file",
+ ph,
+ boost::system::error_code( errno, boost::system::generic_category() ) ) );
+ if ( !contents.empty() ) f << contents;
+ }
+
+ template< class Path >
+ void test( const Path & dir, const Path & file, const Path & dot )
+ {
+ Path tmp;
+ tmp = file;
+ BOOST_TEST( tmp == file );
+ tmp = file.string();
+ BOOST_TEST( tmp == file );
+ tmp = file.string().c_str();
+ BOOST_TEST( tmp == file );
+ fs::initial_path<Path>();
+ fs::current_path<Path>();
+ fs::remove( dir / file );
+ fs::remove( dir );
+ BOOST_TEST( !fs::exists( dir / file ) );
+ BOOST_TEST( !fs::exists( dir ) );
+ BOOST_TEST( fs::create_directory( dir ) );
+ BOOST_TEST( fs::exists( dir ) );
+ BOOST_TEST( fs::is_directory( dir ) );
+ BOOST_TEST( fs::is_empty( dir ) );
+ create_file( dir / file, "wide_test file contents" );
+ BOOST_TEST( fs::exists( dir / file ) );
+ BOOST_TEST( !fs::is_directory( dir / file ) );
+ BOOST_TEST( !fs::is_empty( dir / file ) );
+ BOOST_TEST( fs::file_size( dir / file ) == 23 || fs::file_size( dir / file ) == 24 );
+ BOOST_TEST( fs::equivalent( dir / file, dot / dir / file ) );
+ BOOST_TEST( fs::last_write_time( dir / file ) );
+ typedef fs::basic_directory_iterator<Path> it_t;
+ int count(0);
+ for ( it_t it( dir ); it != it_t(); ++it )
+ {
+ BOOST_TEST( it->path() == dir / file );
+ BOOST_TEST( !fs::is_empty( it->path() ) );
+ ++count;
+ }
+ BOOST_TEST( count == 1 );
+ if ( cleanup )
+ {
+ fs::remove( dir / file );
+ fs::remove( dir );
+ }
+ }
+
+ // test boost::detail::utf8_codecvt_facet - even though it is not used by
+ // Boost.Filesystem on Windows, early detection of problems is worthwhile.
+ std::string to_external( const std::wstring & src )
+ {
+ fs::detail::utf8_codecvt_facet convertor;
+ std::size_t work_size( convertor.max_length() * (src.size()+1) );
+ boost::scoped_array<char> work( new char[ work_size ] );
+ std::mbstate_t state;
+ const wchar_t * from_next;
+ char * to_next;
+ if ( convertor.out(
+ state, src.c_str(), src.c_str()+src.size(), from_next, work.get(),
+ work.get()+work_size, to_next ) != std::codecvt_base::ok )
+ boost::throw_exception( std::runtime_error("to_external conversion error") );
+ *to_next = '\0';
+ return std::string( work.get() );
+ }
+
+} // unnamed namespace
+
+// main ------------------------------------------------------------------------------//
+
+int cpp_main( int argc, char * /*argv*/[] )
+{
+
+ if ( argc > 1 ) cleanup = false;
+
+ // So that tests are run with known encoding, use Boost UTF-8 codecvt
+ std::locale global_loc = std::locale();
+ std::locale loc( global_loc, new fs::detail::utf8_codecvt_facet );
+ fs::wpath_traits::imbue( loc );
+
+ std::string s( to_external( L"\x2780" ) );
+ for (std::size_t i = 0; i < s.size(); ++i )
+ std::cout << std::hex << int( static_cast<unsigned char>(s[i]) ) << " ";
+ std::cout << std::dec << std::endl;
+ BOOST_TEST( to_external( L"\x2780" ).size() == 3 );
+ BOOST_TEST( to_external( L"\x2780" ) == "\xE2\x9E\x80" );
+
+ // test fs::path
+ std::cout << "begin path test..." << std::endl;
+ test( fs::path( "foo" ), fs::path( "bar" ), fs::path( "." ) );
+ std::cout << "complete\n\n";
+
+ // test fs::wpath
+ // x2780 is circled 1 against white background == e2 9e 80 in UTF-8
+ // x2781 is circled 2 against white background == e2 9e 81 in UTF-8
+ std::cout << "begin wpath test..." << std::endl;
+ test( fs::wpath( L"\x2780" ), fs::wpath( L"\x2781" ), fs::wpath( L"." ) );
+ std::cout << "complete\n\n";
+
+ // test user supplied basic_path
+ const long dir[] = { 'b', 'o', 'o', 0 };
+ const long file[] = { 'f', 'a', 'r', 0 };
+ const long dot[] = { '.', 0 };
+ std::cout << "begin lpath test..." << std::endl;
+ test( ::user::lpath( dir ), ::user::lpath( file ), ::user::lpath( dot ) );
+ std::cout << "complete\n\n";
+
+ return ::boost::report_errors();
+}