[boost-doc-zh] r426 committed - 升级至1.44.0,libs/filesystem 下的目录变

  • From: boost-doc-zh@xxxxxxxxxxxxxx
  • To: boost-doc-zh-notify@xxxxxxxxxxxxx
  • Date: Mon, 23 Aug 2010 06:46:19 +0000

Revision: 426
Author: alai04
Date: Sun Aug 22 23:45:06 2010
Log: 升级至1.44.0,libs/filesystem 下的目录变
http://code.google.com/p/boost-doc-zh/source/detail?r=426

Added:
 /trunk/libs/filesystem/build
 /trunk/libs/filesystem/build/Jamfile.v2
 /trunk/libs/filesystem/test/Jamfile.v2
Deleted:
 /trunk/libs/filesystem/doc
 /trunk/libs/filesystem/example
 /trunk/libs/filesystem/src
 /trunk/libs/filesystem/test/convenience_test.cpp
 /trunk/libs/filesystem/test/deprecated_test.cpp
 /trunk/libs/filesystem/test/equivalent.cpp
 /trunk/libs/filesystem/test/fstream_test.cpp
 /trunk/libs/filesystem/test/large_file_support_test.cpp
 /trunk/libs/filesystem/test/lpath.hpp
 /trunk/libs/filesystem/test/operations_test.cpp
 /trunk/libs/filesystem/test/path_test.cpp
 /trunk/libs/filesystem/test/wide_test.cpp

=======================================
--- /dev/null
+++ /trunk/libs/filesystem/build/Jamfile.v2     Sun Aug 22 23:45:06 2010
@@ -0,0 +1,38 @@
+# Boost Filesystem Library Build 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)
+
+
+# See library home page at http://www.boost.org/libs/filesystem
+
+project boost/filesystem
+    : source-location ..
+ : usage-requirements # pass these requirement to dependents (i.e. users)
+      <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
+    ;
+
+SOURCES =
+    v2/src/v2_operations v2/src/v2_path v2/src/v2_portability
+ v3/src/operations v3/src/path v3/src/portability v3/src/utf8_codecvt_facet
+    v3/src/codecvt_error_category v3/src/path_traits v3/src/unique_path
+    v3/src/windows_file_codecvt
+    ;
+
+
+lib boost_filesystem
+    : $(SOURCES).cpp ../../system/build//boost_system
+ : <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1 # tell source we're building dll's
+    :
+ : # Boost.Filesystem uses some of Boost.System functions in inlined/templated + # functions, so clients that use Boost.Filesystem will have direct references + # to Boost.System symbols. On Windows, Darwin, and some other platforms, this + # means those clients have to be directly linked to Boost.System. For static + # linking this happens anyway, but for shared we need to make it happen. Since + # doing so is harmless even when not needed, we do it for all platforms.
+      <link>shared:<library>../../system/build//boost_system
+    ;
+
+
+boost-install boost_filesystem ;
=======================================
--- /dev/null
+++ /trunk/libs/filesystem/test/Jamfile.v2      Sun Aug 22 23:45:06 2010
@@ -0,0 +1,31 @@
+# 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
+      <library>/boost/system//boost_system
+      <toolset>msvc:<asynch-exceptions>on
+    ;
+
+   test-suite "filesystem" :
+       [ run ../v2/test/path_test.cpp :  :  :  : v2_path_test ]
+       [ run ../v2/test/operations_test.cpp :  :  :  : v2_operations_test ]
+       [ run ../v2/test/fstream_test.cpp :  :  :  : v2_fstream_test ]
+ [ run ../v2/test/convenience_test.cpp : : : : v2_convenience_test ] + [ run ../v2/test/large_file_support_test.cpp : : : : v2_large_file_support_test ]
+
+       [ run ../v3/test/path_unit_test.cpp :  :  :  : v3_path_unit_test ]
+       [ run ../v3/test/path_test.cpp :  :  :  : v3_path_test ]
+ [ run ../v3/test/operations_unit_test.cpp : : : : v3_operations_unit_test ]
+       [ run ../v3/test/operations_test.cpp :  :  :  : v3_operations_test ]
+       [ run ../v3/test/fstream_test.cpp :  :  :  : v3_fstream_test ]
+ [ run ../v3/test/convenience_test.cpp : : : : v3_convenience_test ] + [ run ../v3/test/large_file_support_test.cpp : : : : v3_large_file_support_test ]
+       [ run ../v3/test/deprecated_test.cpp :  :  :  : v3_deprecated_test ]
+       [ run ../v3/example/simple_ls.cpp :  :  :  : v3_simple_ls ]
+
+       ;
=======================================
--- /trunk/libs/filesystem/test/convenience_test.cpp Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,167 +0,0 @@
-// 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
-
-#include <boost/config/warning_disable.hpp>
-
-//  See deprecated_test for tests of deprecated features
-#define BOOST_FILESYSTEM_NO_DEPRECATED
-
-#include <boost/filesystem/convenience.hpp>
-namespace fs = boost::filesystem;
-using fs::path;
-namespace sys = boost::system;
-
-#include <boost/test/minimal.hpp>
-#include <boost/bind.hpp>
-#include <fstream>
-#include <iostream>
-
-#ifndef BOOST_FILESYSTEM_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 test_main( int, char*[] )
-{
-
-// create_directories() tests ----------------------------------------------//
-
-  BOOST_CHECK( !fs::create_directories( "" ) );  // should be harmless
-  BOOST_CHECK( !fs::create_directories( "/" ) ); // ditto
-
-  fs::remove_all( "xx" );  // make sure slate is blank
-  BOOST_CHECK( !fs::exists( "xx" ) ); // reality check
-
-  BOOST_CHECK( fs::create_directories( "xx" ) );
-  BOOST_CHECK( fs::exists( "xx" ) );
-  BOOST_CHECK( fs::is_directory( "xx" ) );
-
-  BOOST_CHECK( fs::create_directories( "xx/yy/zz" ) );
-  BOOST_CHECK( fs::exists( "xx" ) );
-  BOOST_CHECK( fs::exists( "xx/yy" ) );
-  BOOST_CHECK( fs::exists( "xx/yy/zz" ) );
-  BOOST_CHECK( fs::is_directory( "xx" ) );
-  BOOST_CHECK( fs::is_directory( "xx/yy" ) );
-  BOOST_CHECK( fs::is_directory( "xx/yy/zz" ) );
-
-  path is_a_file( "xx/uu" );
-  {
-    std::ofstream f( is_a_file.external_file_string().c_str() );
-    BOOST_CHECK( !!f );
-  }
-  BOOST_CHECK( throws_fs_error(
-    boost::bind( BOOST_BND(fs::create_directories), is_a_file ) ) );
-  BOOST_CHECK( 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_CHECK( ec );
-  BOOST_CHECK( 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_CHECK( !!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_CHECK( it->path() == "xx/yy" );
-  BOOST_CHECK( it.level() == 0 );
-  ++it;
-  BOOST_CHECK( it->path() == "xx/yy/zz" );
-  BOOST_CHECK( it.level() == 1 );
-  it.pop();
-  BOOST_CHECK( it->path() == "xx/yya" );
-  BOOST_CHECK( it.level() == 0 );
-  it++;
-  BOOST_CHECK( it == fs::recursive_directory_iterator() );
-
-  it = fs::recursive_directory_iterator( "xx" );
-  BOOST_CHECK( it->path() == "xx/yy" );
-  it.no_push();
-  ++it;
-  BOOST_CHECK( it->path() == "xx/yya" );
-  ++it;
-  BOOST_CHECK( it == fs::recursive_directory_iterator() );
-
-  fs::remove( "xx/yya" );
-#endif
-
-  it = fs::recursive_directory_iterator( "xx/yy/zz" );
-  BOOST_CHECK( it == fs::recursive_directory_iterator() );
-
-  it = fs::recursive_directory_iterator( "xx" );
-  BOOST_CHECK( it->path() == "xx/yy" );
-  BOOST_CHECK( it.level() == 0 );
-  ++it;
-  BOOST_CHECK( it->path() == "xx/yy/zz" );
-  BOOST_CHECK( it.level() == 1 );
-  it++;
-  BOOST_CHECK( it == fs::recursive_directory_iterator() );
-
-  it = fs::recursive_directory_iterator( "xx" );
-  BOOST_CHECK( it->path() == "xx/yy" );
-  it.no_push();
-  ++it;
-  BOOST_CHECK( it == fs::recursive_directory_iterator() );
-
-  it = fs::recursive_directory_iterator( "xx" );
-  BOOST_CHECK( it->path() == "xx/yy" );
-  ++it;
-  it.pop();
-  BOOST_CHECK( it == fs::recursive_directory_iterator() );
-
-
-
-  // nothrow wrong. see imp.  Make sure failed basic_directory_iterator
-  // ctor creates the end iterator.
-
-
-
-
-  return 0;
-}
=======================================
--- /trunk/libs/filesystem/test/deprecated_test.cpp     Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,204 +0,0 @@
-// 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.
-
-#include <boost/filesystem.hpp>
-#include <boost/test/minimal.hpp>
-
-namespace fs = boost::filesystem;
-using boost::filesystem::path;
-
-#define PATH_CHECK( a, b ) check( a, b, __LINE__ )
-
-namespace
-{
-  std::string platform( BOOST_PLATFORM );
-
-  int errors;
-
-  void check( const fs::path & source,
-              const std::string & expected, int line )
-  {
-    if ( source.string()== expected ) return;
-
-    ++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 test_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_CHECK( !fs::is_regular( ng ) ); // verify deprecated name still works
-  BOOST_CHECK( !fs::symbolic_link_exists( "nosuchfileordirectory" ) );
-
-  check_normalize();
-
-// extension() tests ---------------------------------------------------------//
-
-  BOOST_CHECK( fs::extension("a/b") == "" );
-  BOOST_CHECK( fs::extension("a/b.txt") == ".txt" );
-  BOOST_CHECK( fs::extension("a/b.") == "." );
-  BOOST_CHECK( fs::extension("a.b.c") == ".c" );
-  BOOST_CHECK( fs::extension("a.b.c.") == "." );
-  BOOST_CHECK( fs::extension("") == "" );
-  BOOST_CHECK( fs::extension("a/") == "." );
-
-// basename() tests ----------------------------------------------------------//
-
-  BOOST_CHECK( fs::basename("b") == "b" );
-  BOOST_CHECK( fs::basename("a/b.txt") == "b" );
-  BOOST_CHECK( fs::basename("a/b.") == "b" );
-  BOOST_CHECK( fs::basename("a.b.c") == "a.b" );
-  BOOST_CHECK( fs::basename("a.b.c.") == "a.b.c" );
-  BOOST_CHECK( fs::basename("") == "" );
-
-// change_extension tests ---------------------------------------------------//
-
-  BOOST_CHECK( fs::change_extension("a.txt", ".tex").string() == "a.tex" );
-  BOOST_CHECK( fs::change_extension("a.", ".tex").string() == "a.tex" );
-  BOOST_CHECK( fs::change_extension("a", ".txt").string() == "a.txt" );
- BOOST_CHECK( fs::change_extension("a.b.txt", ".tex").string() == "a.b.tex" );
-  // see the rationale in html docs for explanation why this works
-  BOOST_CHECK( fs::change_extension("", ".png").string() == ".png" );
-
-  return errors;
-}
=======================================
--- /trunk/libs/filesystem/test/equivalent.cpp  Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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;
-}
=======================================
--- /trunk/libs/filesystem/test/fstream_test.cpp        Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,180 +0,0 @@
-// 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
-
-#include <boost/config/warning_disable.hpp>
-
-//  See deprecated_test for tests of deprecated features
-#define BOOST_FILESYSTEM_NO_DEPRECATED
-
-#include <boost/filesystem/fstream.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <string>
-#include <iostream>
-#include <cstdio> // for std::remove
-
-#include "../src/utf8_codecvt_facet.hpp"
-
-#ifndef BOOST_FILESYSTEM_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/test/minimal.hpp>
-
-namespace
-{
-  bool cleanup = true;
-
-  template< class Path >
-  void test( const Path & p )
-  {
-# if !BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) // VC++ 6.0 can't handle open
-    {
-      std::cout << " in test 1\n";
-      fs::filebuf fb;
-      fb.open( p, std::ios_base::in );
-      BOOST_CHECK( fb.is_open() == fs::exists( p ) );
-    }
-    {
-      std::cout << " in test 2\n";
-      fs::filebuf fb1;
-      fb1.open( p, std::ios_base::out );
-      BOOST_CHECK( fb1.is_open() );
-    }
-    {
-      std::cout << " in test 3\n";
-      fs::filebuf fb2;
-      fb2.open( p, std::ios_base::in );
-      BOOST_CHECK( 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 4\n";
-      fs::ifstream tfs( p );
-      BOOST_CHECK( tfs.is_open() );
-    }
-    {
-      std::cout << " in test 4.1\n";
-      fs::ifstream tfs( p / p.filename() ); // should fail
-      BOOST_CHECK( !tfs.is_open() );
-    }
-    {
-      std::cout << " in test 5\n";
-      fs::ifstream tfs( p, std::ios_base::in );
-      BOOST_CHECK( 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_CHECK( tfs.is_open() );
-    }
-    {
-      std::cout << " in test 7\n";
-      fs::ifstream tfs;
-      tfs.open( p, std::ios_base::in );
-      BOOST_CHECK( tfs.is_open() );
-    }
-#  endif
-    {
-      std::cout << " in test 8\n";
-      fs::ofstream tfs( p );
-      BOOST_CHECK( tfs.is_open() );
-    }
-    {
-      std::cout << " in test 9\n";
-      fs::ofstream tfs( p, std::ios_base::out );
-      BOOST_CHECK( 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_CHECK( tfs.is_open() );
-    }
-    {
-      std::cout << " in test 11\n";
-      fs::ofstream tfs;
-      tfs.open( p, std::ios_base::out );
-      BOOST_CHECK( tfs.is_open() );
-    }
-# endif
-    {
-      std::cout << " in test 12\n";
-      fs::fstream tfs( p );
-      BOOST_CHECK( tfs.is_open() );
-    }
-    {
-      std::cout << " in test 13\n";
-      fs::fstream tfs( p, std::ios_base::in|std::ios_base::out );
-      BOOST_CHECK( 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_CHECK( tfs.is_open() );
-    }
-    {
-      std::cout << " in test 15\n";
-      fs::fstream tfs;
-      tfs.open( p, std::ios_base::in|std::ios_base::out );
-      BOOST_CHECK( tfs.is_open() );
-    }
-#  endif
-
-    if ( cleanup ) fs::remove( p );
-
-  } // test
-} // unnamed namespace
-
-int test_main( int argc, char*[] )
-{
-  if ( argc > 1 ) cleanup = false;
-
-  // test fs::path
-  std::cout << "path tests:\n";
-  test( fs::path( "fstream_test_foo" ) );
-
-#ifndef BOOST_FILESYSTEM_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"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 0;
-}
=======================================
--- /trunk/libs/filesystem/test/large_file_support_test.cpp Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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
-
-
-//  See deprecated_test for tests of deprecated features
-#define BOOST_FILESYSTEM_NO_DEPRECATED
-
-#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;
-}
=======================================
--- /trunk/libs/filesystem/test/lpath.hpp       Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,101 +0,0 @@
-// 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/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 filesystem
-  {
-    template<> struct is_basic_path<user::lpath>
-      { static const bool value = true; };
-  }
-}
=======================================
--- /trunk/libs/filesystem/test/operations_test.cpp     Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,929 +0,0 @@
-// 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
-
-#include <boost/config/warning_disable.hpp>
-
-//  See deprecated_test for tests of deprecated features
-#define BOOST_FILESYSTEM_NO_DEPRECATED
-
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/convenience.hpp>
-#include <boost/cerrno.hpp>
-namespace fs = boost::filesystem;
-
-#include <boost/config.hpp>
-#include <boost/test/minimal.hpp>
-//#include <boost/concept_check.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_FILESYSTEM_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 = "temp_fs_test_dir";
-
-  void create_file( const fs::path & ph, const std::string & contents )
-  {
-    std::ofstream f( ph.file_string().c_str() );
-    if ( !f )
-      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 )
-      throw fs::filesystem_error( "operations_test verify_file",
-        ph, error_code(errno, system_category) );
-    std::string contents;
-    f >> contents;
-    if ( contents != expected )
-      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_CHECK( std::strncmp( x.what(),
-          "boost::filesystem::create_directory",
-          sizeof("boost::filesystem::create_directory")-1 ) == 0 );
-    }
-    BOOST_CHECK( 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_CHECK( std::strcmp( x.what(),
- "boost::filesystem::create_directory: The system cannot find the path specified" ) == 0 );
-    }
-    BOOST_CHECK( 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_CHECK( ok );
-        if ( !ok )
-        {
-          std::cout << "what returns \"" << x.what() << "\"" << std::endl;
-        }
-      }
-    }
-    BOOST_CHECK( 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_CHECK( ok );
-        if ( !ok )
-        {
-          std::cout << "what returns \"" << x.what() << "\"" << std::endl;
-        }
-      }
-    }
-    BOOST_CHECK( 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
-
-// test_main ---------------------------------------------------------------//
-
-int test_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
- platform = ( platform == "Win32" || platform == "Win64" || platform == "Cygwin" )
-               ? "Windows"
-               : "POSIX";
-# 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_CHECK( fs::initial_path<fs::path>().is_complete() );
-  BOOST_CHECK( fs::current_path<fs::path>().is_complete() );
-  BOOST_CHECK( fs::initial_path<fs::path>().string()
-    == fs::current_path<fs::path>().string() );
-
-  BOOST_CHECK( fs::complete( "" ).empty() );
- BOOST_CHECK( fs::complete( "/" ).string() == fs::initial_path<fs::path>().root_path().string() ); - BOOST_CHECK( fs::complete( "foo" ).string() == fs::initial_path<fs::path>().string()+"/foo" ); - BOOST_CHECK( fs::complete( "/foo" ).string() == fs::initial_path<fs::path>().root_path().string()+"foo" );
-  BOOST_CHECK( fs::complete( "foo", fs::path( "//net/bar" ) ).string()
-      ==  "//net/bar/foo" );
-
-  // predicate and status tests
-  BOOST_CHECK( fs::exists( "/" ) );
-  fs::path ng( " no-way, Jose" );
-  BOOST_CHECK( !fs::exists( ng ) );
-  BOOST_CHECK( !fs::is_directory( ng ) );
-  BOOST_CHECK( !fs::is_regular_file( ng ) );
-  BOOST_CHECK( !fs::is_symlink( ng ) );
-  fs::file_status stat( fs::status( ng ) );
-  BOOST_CHECK( fs::status_known( stat ) );
-  BOOST_CHECK( !fs::exists( stat ) );
-  BOOST_CHECK( !fs::is_directory( stat ) );
-  BOOST_CHECK( !fs::is_regular_file( stat ) );
-  BOOST_CHECK( !fs::is_other( stat ) );
-  BOOST_CHECK( !fs::is_symlink( stat ) );
-  stat = fs::status( "" );
-  BOOST_CHECK( fs::status_known( stat ) );
-  BOOST_CHECK( !fs::exists( stat ) );
-  BOOST_CHECK( !fs::is_directory( stat ) );
-  BOOST_CHECK( !fs::is_regular_file( stat ) );
-  BOOST_CHECK( !fs::is_other( stat ) );
-  BOOST_CHECK( !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_CHECK( !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_CHECK( fs::exists( dir ) );
-  BOOST_CHECK( BOOST_FS_IS_EMPTY( dir ) );
-  BOOST_CHECK( fs::is_directory( dir ) );
-  BOOST_CHECK( !fs::is_regular_file( dir ) );
-  BOOST_CHECK( !fs::is_other( dir ) );
-  BOOST_CHECK( !fs::is_symlink( dir ) );
-  stat = fs::status( dir );
-  BOOST_CHECK( fs::exists( stat ) );
-  BOOST_CHECK( fs::is_directory( stat ) );
-  BOOST_CHECK( !fs::is_regular_file( stat ) );
-  BOOST_CHECK( !fs::is_other( stat ) );
-  BOOST_CHECK( !fs::is_symlink( stat ) );
-
-  // Windows only tests
-  if ( platform == "Windows" )
-  {
-    BOOST_CHECK( !fs::exists( fs::path( "//share-not" ) ) );
-    BOOST_CHECK( !fs::exists( fs::path( "//share-not/" ) ) );
-    BOOST_CHECK( !fs::exists( fs::path( "//share-not/foo" ) ) );
- BOOST_CHECK( !fs::exists( "tools/jam/src/:sys:stat.h" ) ); // !exists() if ERROR_INVALID_NAME - BOOST_CHECK( !fs::exists( ":sys:stat.h" ) ); // !exists() if ERROR_INVALID_PARAMETER
-    BOOST_CHECK( dir.string().size() > 1
-      && dir.string()[1] == ':' ); // verify path includes drive
-
-    BOOST_CHECK( fs::system_complete( "" ).empty() );
-    BOOST_CHECK( fs::system_complete( "/" ).string()
-      == fs::initial_path<fs::path>().root_path().string() );
-    BOOST_CHECK( fs::system_complete( "foo" ).string()
-      == fs::initial_path<fs::path>().string()+"/foo" );
-    BOOST_CHECK( fs::system_complete( "/foo" ).string()
-      == fs::initial_path<fs::path>().root_path().string()+"foo" );
-    BOOST_CHECK( fs::complete( fs::path( "c:/" ) ).string()
-      == "c:/" );
-    BOOST_CHECK( fs::complete( fs::path( "c:/foo" ) ).string()
-      ==  "c:/foo" );
-
- BOOST_CHECK( fs::system_complete( fs::path( fs::initial_path<fs::path>().root_name() ) ).string() == fs::initial_path<fs::path>().string() ); - BOOST_CHECK( fs::system_complete( fs::path( fs::initial_path<fs::path>().root_name() - + "foo" ) ).string() == fs::initial_path<fs::path>().string()+"/foo" );
-    BOOST_CHECK( fs::system_complete( fs::path( "c:/" ) ).string()
-      == "c:/" );
-    BOOST_CHECK( fs::system_complete( fs::path( "c:/foo" ) ).string()
-      ==  "c:/foo" );
-    BOOST_CHECK( fs::system_complete( fs::path( "//share" ) ).string()
-      ==  "//share" );
-  } // Windows
-
-  else if ( platform == "POSIX" )
-  {
-    BOOST_CHECK( fs::system_complete( "" ).empty() );
- BOOST_CHECK( fs::initial_path<fs::path>().root_path().string() == "/" );
-    BOOST_CHECK( fs::system_complete( "/" ).string() == "/" );
-    BOOST_CHECK( fs::system_complete( "foo" ).string()
-      == fs::initial_path<fs::path>().string()+"/foo" );
-    BOOST_CHECK( 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_CHECK( CHECK_EXCEPTION( bad_file_size, ENOENT ) );
-
-  // test path::exception members
-  try { fs::file_size( ng ); } // will throw
-
-  catch ( const fs::filesystem_error & ex )
-  {
-    BOOST_CHECK( 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_CHECK( sizeof( boost::uintmax_t ) >= 8 );
-
-  // set the current directory, then check it for consistency
-  fs::path original_dir = fs::current_path<fs::path>();
-  BOOST_CHECK( dir != original_dir );
-  fs::current_path( dir );
-  BOOST_CHECK( fs::current_path<fs::path>() == dir );
-  BOOST_CHECK( fs::current_path<fs::path>() != original_dir );
-  fs::current_path( original_dir );
-  BOOST_CHECK( fs::current_path<fs::path>() == original_dir );
-  BOOST_CHECK( fs::current_path<fs::path>() != dir );
-  // make sure the overloads work
-  fs::current_path( dir.string().c_str() );
-  BOOST_CHECK( fs::current_path<fs::path>() == dir );
-  BOOST_CHECK( fs::current_path<fs::path>() != original_dir );
-  fs::current_path( original_dir.string() );
-  BOOST_CHECK( fs::current_path<fs::path>() == original_dir );
-  BOOST_CHECK( fs::current_path<fs::path>() != dir );
-
-  // make some reasonable assuptions for testing purposes
-  fs::space_info spi( fs::space( dir ) );
-  BOOST_CHECK( spi.capacity > 1000000 );
-  BOOST_CHECK( spi.free > 1000 );
-  BOOST_CHECK( spi.capacity > spi.free );
-  BOOST_CHECK( 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_CHECK( CHECK_EXCEPTION( bad_directory_size, ENOENT ) );
-  else
-    BOOST_CHECK( CHECK_EXCEPTION( bad_directory_size, 0 ) );
-  BOOST_CHECK( !fs::create_directory( dir ) );
-
-  BOOST_CHECK( !fs::is_symlink( dir ) );
-  BOOST_CHECK( !fs::is_symlink( "nosuchfileordirectory" ) );
-
-  fs::path d1( dir / "d1" );
-  BOOST_CHECK( fs::create_directory( d1 ) );
-  BOOST_CHECK( fs::exists( d1 ) );
-  BOOST_CHECK( fs::is_directory( d1 ) );
-  BOOST_CHECK( 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_CHECK( dir_itr_exception );
-
-  dir_itr_exception = false;
-  try { fs::directory_iterator it( "nosuchdirectory" ); }
-  catch ( const fs::filesystem_error & ) { dir_itr_exception = true; }
-  BOOST_CHECK( dir_itr_exception );
-
-  dir_itr_exception = false;
-  try
-  {
-    error_code ec;
-    fs::directory_iterator it( "nosuchdirectory", ec );
-    BOOST_CHECK( ec );
-    BOOST_CHECK( ec == fs::detail::not_found_error() );
-  }
-  catch ( const fs::filesystem_error & ) { dir_itr_exception = true; }
-  BOOST_CHECK( !dir_itr_exception );
-
-  {
-    // probe query function overloads
-    fs::directory_iterator dir_itr( dir );
-    BOOST_CHECK( fs::is_directory( *dir_itr ) );
-    BOOST_CHECK( fs::is_directory( dir_itr->status() ) );
-    BOOST_CHECK( fs::is_directory( fs::symlink_status(*dir_itr) ) );
-    BOOST_CHECK( fs::is_directory( dir_itr->symlink_status() ) );
-    BOOST_CHECK( dir_itr->path().filename() == "d1" );
-  }
-
-  // create a second directory named d2
-  fs::path d2( dir / "d2" );
-  fs::create_directory(d2 );
-  BOOST_CHECK( fs::exists( d2 ) );
-  BOOST_CHECK( 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_CHECK( fs::exists(dir_itr->status()) );
-    BOOST_CHECK( fs::is_directory(dir_itr->status()) );
-    BOOST_CHECK( !fs::is_regular_file(dir_itr->status()) );
-    BOOST_CHECK( !fs::is_other(dir_itr->status()) );
-    BOOST_CHECK( !fs::is_symlink(dir_itr->status()) );
-
-    fs::directory_iterator dir_itr2( dir );
-    BOOST_CHECK( dir_itr->path().filename() == "d1"
-      || dir_itr->path().filename() == "d2" );
- BOOST_CHECK( dir_itr2->path().filename() == "d1" || dir_itr2->path().filename() == "d2" );
-    if ( dir_itr->path().filename() == "d1" )
-    {
-      BOOST_CHECK( (++dir_itr)->path().filename() == "d2" );
-      BOOST_CHECK( dir_itr2->path().filename() == "d1" );
-      BOOST_CHECK( (++dir_itr2)->path().filename() == "d2" );
-    }
-    else
-    {
-      BOOST_CHECK( dir_itr->path().filename() == "d2" );
-      BOOST_CHECK( (++dir_itr)->path().filename() == "d1" );
-      BOOST_CHECK( (dir_itr2)->path().filename() == "d2" );
-      BOOST_CHECK( (++dir_itr2)->path().filename() == "d1" );
-    }
-    BOOST_CHECK( ++dir_itr == fs::directory_iterator() );
-    BOOST_CHECK( dir_itr2 != fs::directory_iterator() );
-    BOOST_CHECK( ++dir_itr2 == fs::directory_iterator() );
-  }
-
-  { // *i++ must work to meet the standard's InputIterator requirements
-    fs::directory_iterator dir_itr( dir );
-    BOOST_CHECK( dir_itr->path().filename() == "d1"
-      || dir_itr->path().filename() == "d2" );
-    if ( dir_itr->path().filename() == "d1" )
-    {
-      BOOST_CHECK( (*dir_itr++).path().filename() == "d1" );
-      BOOST_CHECK( dir_itr->path().filename() == "d2" );
-    }
-    else
-    {
-      // Check C++98 input iterator requirements
-      BOOST_CHECK( (*dir_itr++).path().filename() == "d2" );
- // input iterator requirements in the current WP would require this check: - // BOOST_CHECK( implicit_cast<std::string const&>(*dir_itr++).filename() == "d1" );
-
-      BOOST_CHECK( 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_CHECK( it != fs::directory_iterator() );
-    const fs::path p2 = *it++;
-    BOOST_CHECK( p1 != p2 );
-    BOOST_CHECK( 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_CHECK( it != fs::directory_iterator() );
-    BOOST_CHECK( fs::exists( *it ) );
-    BOOST_CHECK( 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_CHECK( found );
-  }
-
-  // create an empty file named "f0"
-  fs::path file_ph( dir / "f0");
-  create_file( file_ph, "" );
-  BOOST_CHECK( fs::exists( file_ph ) );
-  BOOST_CHECK( !fs::is_directory( file_ph ) );
-  BOOST_CHECK( fs::is_regular_file( file_ph ) );
-  BOOST_CHECK( BOOST_FS_IS_EMPTY( file_ph ) );
-  BOOST_CHECK( fs::file_size( file_ph ) == 0 );
-  bad_create_directory_path = file_ph;
-  BOOST_CHECK( CHECK_EXCEPTION( bad_create_directory, EEXIST ) );
-  stat = fs::status( file_ph );
-  BOOST_CHECK( fs::status_known( stat ) );
-  BOOST_CHECK( fs::exists( stat ) );
-  BOOST_CHECK( !fs::is_directory( stat ) );
-  BOOST_CHECK( fs::is_regular_file( stat ) );
-  BOOST_CHECK( !fs::is_other( stat ) );
-  BOOST_CHECK( !fs::is_symlink( stat ) );
-
-  // create a file named "f1"
-  file_ph = dir / "f1";
-  create_file( file_ph, "foobar1" );
-
-  BOOST_CHECK( fs::exists( file_ph ) );
-  BOOST_CHECK( !fs::is_directory( file_ph ) );
-  BOOST_CHECK( fs::is_regular_file( file_ph ) );
-  BOOST_CHECK( fs::file_size( file_ph ) == 7 );
-  verify_file( file_ph, "foobar1" );
-
-  // equivalence tests
-  BOOST_CHECK( CHECK_EXCEPTION( bad_equivalent, ENOENT ) );
-  BOOST_CHECK( fs::equivalent( file_ph, dir / "f1" ) );
-  BOOST_CHECK( fs::equivalent( dir, d1 / ".." ) );
-  BOOST_CHECK( !fs::equivalent( file_ph, dir ) );
-  BOOST_CHECK( !fs::equivalent( dir, file_ph ) );
-  BOOST_CHECK( !fs::equivalent( d1, d2 ) );
-  BOOST_CHECK( !fs::equivalent( dir, ng ) );
-  BOOST_CHECK( !fs::equivalent( ng, dir ) );
-  BOOST_CHECK( !fs::equivalent( file_ph, ng ) );
-  BOOST_CHECK( !fs::equivalent( ng, file_ph ) );
-
-  // hard link tests
-  fs::path from_ph( dir / "f3" );
-  BOOST_CHECK( !fs::exists( from_ph ) );
-  BOOST_CHECK( 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() succeeded\n";
-    BOOST_CHECK( fs::exists( from_ph ) );
-    BOOST_CHECK( fs::exists( file_ph ) );
-    BOOST_CHECK( fs::equivalent( from_ph, file_ph ) );
-  }
-
-  error_code ec;
-  BOOST_CHECK( fs::create_hard_link( fs::path("doesnotexist"),
-    fs::path("shouldnotwork"), ec ) );
-  BOOST_CHECK( ec );
-
-  // symbolic link tests
-  from_ph = dir / "f4";
-  BOOST_CHECK( !fs::exists( from_ph ) );
-  BOOST_CHECK( 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_CHECK( fs::exists( from_ph ) );
-    BOOST_CHECK( fs::is_symlink( from_ph ) );
-    BOOST_CHECK( fs::exists( file_ph ) );
-    BOOST_CHECK( fs::equivalent( from_ph, file_ph ) );
-    stat = fs::symlink_status( from_ph );
-    BOOST_CHECK( fs::exists( stat ) );
-    BOOST_CHECK( !fs::is_directory( stat ) );
-    BOOST_CHECK( !fs::is_regular_file( stat ) );
-    BOOST_CHECK( !fs::is_other( stat ) );
-    BOOST_CHECK( fs::is_symlink( stat ) );
-  }
-
-  ec = error_code();
-  BOOST_CHECK( fs::create_symlink( "doesnotexist", "", ec ) );
-  BOOST_CHECK( 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_CHECK( ++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_CHECK( fs::exists( file_ph ) );
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-  BOOST_CHECK( !fs::is_directory( d1 / "f2" ) );
-  verify_file( d1 / "f2", "foobar1" );
-  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_CHECK( !fs::exists( d1 / "f99" ) );
-  BOOST_CHECK( !fs::exists( d1 / "f98" ) );
-  renamer n1a( d1 / "f99", d1 / "f98" );
-  BOOST_CHECK( CHECK_EXCEPTION( n1a, ENOENT ) );
-  renamer n1b( fs::path(""), d1 / "f98" );
-  BOOST_CHECK( CHECK_EXCEPTION( n1b, ENOENT ) );
-
-  // [case 2] rename() target.empty()
-  renamer n2( file_ph, "" );
-  BOOST_CHECK( CHECK_EXCEPTION( n2, ENOENT ) );
-
-  // [case 3] make sure can't rename() to an existent file or directory
-  BOOST_CHECK( fs::exists( dir / "f1" ) );
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-  renamer n3a( dir / "f1", d1 / "f2" );
-  BOOST_CHECK( 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_CHECK( CHECK_EXCEPTION( n3b, 0 ) );
-
-  // [case 4A] can't rename() file to a nonexistent parent directory
-  BOOST_CHECK( !fs::is_directory( dir / "f1" ) );
-  BOOST_CHECK( !fs::exists( dir / "d3/f3" ) );
-  renamer n4a( dir / "f1", dir / "d3/f3" );
-  BOOST_CHECK( CHECK_EXCEPTION( n4a, ENOENT ) );
-
-  // [case 4B] rename() file in same directory
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-  BOOST_CHECK( !fs::exists( d1 / "f50" ) );
-  fs::rename( d1 / "f2", d1 / "f50" );
-  BOOST_CHECK( !fs::exists( d1 / "f2" ) );
-  BOOST_CHECK( fs::exists( d1 / "f50" ) );
-  fs::rename( d1 / "f50", d1 / "f2" );
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-  BOOST_CHECK( !fs::exists( d1 / "f50" ) );
-
-  // [case 4C] rename() file d1/f2 to d2/f3
-  fs::rename( d1 / "f2", d2 / "f3" );
-  BOOST_CHECK( !fs::exists( d1 / "f2" ) );
-  BOOST_CHECK( !fs::exists( d2 / "f2" ) );
-  BOOST_CHECK( fs::exists( d2 / "f3" ) );
-  BOOST_CHECK( !fs::is_directory( d2 / "f3" ) );
-  verify_file( d2 / "f3", "foobar1" );
-  fs::rename( d2 / "f3", d1 / "f2" );
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-
-  // [case 5A] rename() directory to nonexistent parent directory
-  BOOST_CHECK( fs::exists( d1 ) );
-  BOOST_CHECK( !fs::exists( dir / "d3/d5" ) );
-  BOOST_CHECK( !fs::exists( dir / "d3" ) );
-  renamer n5a( d1, dir / "d3/d5" );
-  BOOST_CHECK( CHECK_EXCEPTION( n5a, ENOENT ) );
-
-  // [case 5B] rename() on directory
-  fs::path d3( dir / "d3" );
-  BOOST_CHECK( fs::exists( d1 ) );
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-  BOOST_CHECK( !fs::exists( d3 ) );
-  fs::rename( d1, d3 );
-  BOOST_CHECK( !fs::exists( d1 ) );
-  BOOST_CHECK( fs::exists( d3 ) );
-  BOOST_CHECK( fs::is_directory( d3 ) );
-  BOOST_CHECK( !fs::exists( d1 / "f2" ) );
-  BOOST_CHECK( fs::exists( d3 / "f2" ) );
-  fs::rename( d3, d1 );
-  BOOST_CHECK( fs::exists( d1 ) );
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-  BOOST_CHECK( !fs::exists( d3 ) );
-
-  // [case 5C] rename() rename and move d1 to d2 / "d20"
-  BOOST_CHECK( fs::exists( d1 ) );
-  BOOST_CHECK( !fs::exists( d2 / "d20" ) );
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-  fs::rename( d1, d2 / "d20" );
-  BOOST_CHECK( !fs::exists( d1 ) );
-  BOOST_CHECK( fs::exists( d2 / "d20" ) );
-  BOOST_CHECK( fs::exists( d2 / "d20" / "f2" ) );
-  fs::rename( d2 / "d20", d1 );
-  BOOST_CHECK( fs::exists( d1 ) );
-  BOOST_CHECK( !fs::exists( d2 / "d20" ) );
-  BOOST_CHECK( fs::exists( d1 / "f2" ) );
-
-  // remove() file
-  file_ph = dir / "shortlife";
-  BOOST_CHECK( !fs::exists( file_ph ) );
-  create_file( file_ph, "" );
-  BOOST_CHECK( fs::exists( file_ph ) );
-  BOOST_CHECK( !fs::is_directory( file_ph ) );
-  BOOST_CHECK( fs::remove( file_ph ) );
-  BOOST_CHECK( !fs::exists( file_ph ) );
-  BOOST_CHECK( !fs::remove( "no-such-file" ) );
-  BOOST_CHECK( !fs::remove( "no-such-directory/no-such-file" ) );
-
-  // remove() directory
-  d1 = dir / "shortlife_dir";
-  BOOST_CHECK( !fs::exists( d1 ) );
-  fs::create_directory( d1 );
-  BOOST_CHECK( fs::exists( d1 ) );
-  BOOST_CHECK( fs::is_directory( d1 ) );
-  BOOST_CHECK( BOOST_FS_IS_EMPTY( d1 ) );
-  bad_remove_dir = dir;
-  BOOST_CHECK( CHECK_EXCEPTION( bad_remove, ENOTEMPTY ) );
-  BOOST_CHECK( fs::remove( d1 ) );
-  BOOST_CHECK( !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_CHECK( !fs::is_symlink( link ) );
-    BOOST_CHECK( !fs::exists( link ) );
-    fs::create_symlink( "nowhere", link );
-    BOOST_CHECK( !fs::exists( link ) );
-    BOOST_CHECK( fs::is_symlink( link ) );
-    BOOST_CHECK( fs::remove( link ) );
-    BOOST_CHECK( !fs::is_symlink( link ) );
-
-    // remove() self-refering symbolic link
-    link = "link_to_self";
-    fs::remove( link );  // remove any residue from past tests
-    BOOST_CHECK( !fs::is_symlink( link ) );
-    BOOST_CHECK( !fs::exists( link ) );
-    fs::create_symlink( link, link );
-    BOOST_CHECK( fs::remove( link ) );
-    BOOST_CHECK( !fs::exists( link ) );
-    BOOST_CHECK( !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_CHECK( !fs::is_symlink( link ) );
-    BOOST_CHECK( !fs::exists( link ) );
-    fs::create_symlink( link, link2 );
-    fs::create_symlink( link2, link );
-    BOOST_CHECK( fs::remove( link ) );
-    BOOST_CHECK( fs::remove( link2 ) );
-    BOOST_CHECK( !fs::exists( link ) );
-    BOOST_CHECK( !fs::exists( link2 ) );
-    BOOST_CHECK( !fs::is_symlink( link ) );
-
-    // remove() symbolic link to file
-    file_ph = "link_target";
-    fs::remove( file_ph );  // remove any residue from past tests
-    BOOST_CHECK( !fs::exists( file_ph ) );
-    create_file( file_ph, "" );
-    BOOST_CHECK( fs::exists( file_ph ) );
-    BOOST_CHECK( !fs::is_directory( file_ph ) );
-    BOOST_CHECK( fs::is_regular_file( file_ph ) );
-    link = "non_dangling_link";
-    fs::create_symlink( file_ph, link );
-    BOOST_CHECK( fs::exists( link ) );
-    BOOST_CHECK( !fs::is_directory( link ) );
-    BOOST_CHECK( fs::is_regular_file( link ) );
-    BOOST_CHECK( fs::is_symlink( link ) );
-    BOOST_CHECK( fs::remove( link ) );
-    BOOST_CHECK( fs::exists( file_ph ) );
-    BOOST_CHECK( !fs::exists( link ) );
-    BOOST_CHECK( !fs::is_symlink( link ) );
-    BOOST_CHECK( fs::remove( file_ph ) );
-    BOOST_CHECK( !fs::exists( file_ph ) );
-  }
-
-  // write time tests
-
-  file_ph = dir / "foobar2";
-  create_file( file_ph, "foobar2" );
-  BOOST_CHECK( fs::exists( file_ph ) );
-  BOOST_CHECK( !fs::is_directory( file_ph ) );
-  BOOST_CHECK( fs::is_regular_file( file_ph ) );
-  BOOST_CHECK( 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_CHECK( 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_CHECK( time_diff >= -60.0 && time_diff <= 60.0 );
-
-  // post-test cleanup
-  BOOST_CHECK( 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_CHECK( !fs::exists( dir ) );
-  BOOST_CHECK( fs::remove_all( dir ) == 0 );
-  return 0;
-} // main
-
=======================================
--- /trunk/libs/filesystem/test/path_test.cpp   Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,1250 +0,0 @@
-// 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.
-
-//  See deprecated_test for tests of deprecated features
-#define BOOST_FILESYSTEM_NO_DEPRECATED
-
-#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;
-using boost::next;
-using boost::prior;
-
-#include <boost/test/minimal.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 );
-
-  int errors;
-
-  void check( const fs::path & source,
-              const std::string & expected, int line )
-  {
-    if ( source.string()== expected ) return;
-
-    ++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;
-
-    ++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;
-
-    ++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 { throw fs::filesystem_error( str_1, ec ); }
-    catch ( const fs::filesystem_error & ex )
-    {
-      //std::cout << ex.what() << "*" << std::endl;
-      //BOOST_CHECK( std::strcmp( ex.what(),
-      //  "string-1: Unknown error" ) == 0 );
-      BOOST_CHECK( ex.code() == ec );
-    }
-
-    try { throw fs::filesystem_error( str_1, "p1", "p2", ec ); }
-    catch ( const fs::filesystem_error & ex )
-    {
-      //std::cout << ex.what() << "*" << std::endl;
-      //BOOST_CHECK( std::strcmp( ex.what(),
-      //  "string-1: Unknown error: \"p1\", \"p2\"" ) == 0 );
-      BOOST_CHECK( ex.code() == ec );
-      BOOST_CHECK( ex.path1().string() == "p1" );
-      BOOST_CHECK( ex.path2().string() == "p2" );
-    }
-  }
-
-} // unnamed namespace
-
-int test_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_CHECK( p1.string() != p3.string() );
-  p3 = p2;
-  BOOST_CHECK( p1.string() == p3.string() );
-
-  path p4( "foobar" );
-  BOOST_CHECK( p4.string() == "foobar" );
-  p4 = p4; // self-assignment
-  BOOST_CHECK( p4.string() == "foobar" );
-
-  exception_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_CHECK( 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
-
-  BOOST_CHECK( p1 != p4 );
-  BOOST_CHECK( p1.string() == p2.string() );
-  BOOST_CHECK( p1.string() == p3.string() );
-  BOOST_CHECK( path( "foo" ).filename() == "foo" );
-  BOOST_CHECK( path( "foo" ).parent_path().string() == "" );
-  BOOST_CHECK( p1.filename() == "fum" );
-  BOOST_CHECK( p1.parent_path().string() == "fe/fi/fo" );
-  BOOST_CHECK( path( "" ).empty() == true );
-  BOOST_CHECK( 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_CHECK( itr == itr_ck.end() );
-
-  itr_ck = "/";
-  itr = itr_ck.begin();
-  BOOST_CHECK( *itr == std::string( "/" ) );
-  BOOST_CHECK( ++itr == itr_ck.end() );
-  BOOST_CHECK( *--itr == std::string( "/" ) );
-
-  itr_ck = "foo";
-  BOOST_CHECK( *itr_ck.begin() == std::string( "foo" ) );
-  BOOST_CHECK( next( itr_ck.begin() ) == itr_ck.end() );
-  BOOST_CHECK( *prior( itr_ck.end() ) == std::string( "foo" ) );
-  BOOST_CHECK( prior( itr_ck.end() ) == itr_ck.begin() );
-
-  itr_ck = path( "/foo" );
-  BOOST_CHECK( *itr_ck.begin() == std::string( "/" ) );
-  BOOST_CHECK( *next( itr_ck.begin() ) == std::string( "foo" ) );
-  BOOST_CHECK( next(next( itr_ck.begin() )) == itr_ck.end() );
-  BOOST_CHECK( next( itr_ck.begin() ) == prior( itr_ck.end() ) );
-  BOOST_CHECK( *prior( itr_ck.end() ) == std::string( "foo" ) );
-  BOOST_CHECK( *prior(prior( itr_ck.end() )) == std::string( "/" ) );
-  BOOST_CHECK( prior(prior( itr_ck.end() )) == itr_ck.begin() );
-
-  itr_ck = "/foo/bar";
-  itr = itr_ck.begin();
-  BOOST_CHECK( *itr == std::string( "/" ) );
-  BOOST_CHECK( *++itr == std::string( "foo" ) );
-  BOOST_CHECK( *++itr == std::string( "bar" ) );
-  BOOST_CHECK( ++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_CHECK( ++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_CHECK( ++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_CHECK( ++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_CHECK( ++itr == itr_ck.end() );
-  CHECK_EQUAL( *--itr, "//net" );
-
-  itr_ck = "//net/";
-  itr = itr_ck.begin();
-  CHECK_EQUAL( *itr, "//net" );
-  CHECK_EQUAL( *++itr, "/" );
-  BOOST_CHECK( ++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_CHECK( ++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_CHECK( ++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_CHECK( ++itr == itr_ck.end() );
-    CHECK_EQUAL( *--itr, "/" );
-    CHECK_EQUAL( *--itr, "c:" );
-
-    itr_ck = "c:/foo";
-    itr = itr_ck.begin();
-    BOOST_CHECK( *itr == std::string( "c:" ) );
-    BOOST_CHECK( *++itr == std::string( "/" ) );
-    BOOST_CHECK( *++itr == std::string( "foo" ) );
-    BOOST_CHECK( ++itr == itr_ck.end() );
-    BOOST_CHECK( *--itr == std::string( "foo" ) );
-    BOOST_CHECK( *--itr == std::string( "/" ) );
-    BOOST_CHECK( *--itr == std::string( "c:" ) );
-
-    itr_ck = "c:foo";
-    itr = itr_ck.begin();
-    BOOST_CHECK( *itr == std::string( "c:" ) );
-    BOOST_CHECK( *++itr == std::string( "foo" ) );
-    BOOST_CHECK( ++itr == itr_ck.end() );
-    BOOST_CHECK( *--itr == std::string( "foo" ) );
-    BOOST_CHECK( *--itr == std::string( "c:" ) );
-
-    itr_ck = "c:foo/";
-    itr = itr_ck.begin();
-    BOOST_CHECK( *itr == std::string( "c:" ) );
-    BOOST_CHECK( *++itr == std::string( "foo" ) );
-    BOOST_CHECK( *++itr == std::string( "." ) );
-    BOOST_CHECK( ++itr == itr_ck.end() );
-    BOOST_CHECK( *--itr == std::string( "." ) );
-    BOOST_CHECK( *--itr == std::string( "foo" ) );
-    BOOST_CHECK( *--itr == std::string( "c:" ) );
-  }
-  else
-  {
-    itr_ck = "///";
-    itr = itr_ck.begin();
-    CHECK_EQUAL( *itr,  "/" );
-    BOOST_CHECK( ++itr == itr_ck.end() );
-  }
-
-  path p;
-
-  p = "";
-  BOOST_CHECK( p.relative_path().string() == "" );
-  BOOST_CHECK( p.parent_path().string() == "" );
-  BOOST_CHECK( p.filename() == "" );
-  BOOST_CHECK( p.root_name() == "" );
-  BOOST_CHECK( p.root_directory() == "" );
-  BOOST_CHECK( p.root_path().string() == "" );
-  BOOST_CHECK( !p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( !p.has_relative_path() );
-  BOOST_CHECK( !p.has_filename() );
-  BOOST_CHECK( !p.has_parent_path() );
-  BOOST_CHECK( !p.is_complete() );
-
-  p = "/";
-  BOOST_CHECK( p.relative_path().string() == "" );
-  BOOST_CHECK( p.parent_path().string() == "" );
-  BOOST_CHECK( p.filename() == "/" );
-  BOOST_CHECK( p.root_name() == "" );
-  BOOST_CHECK( p.root_directory() == "/" );
-  BOOST_CHECK( p.root_path().string() == "/" );
-  BOOST_CHECK( p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( !p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( !p.has_parent_path() );
-  if ( platform == "POSIX" )
-    BOOST_CHECK( p.is_complete() );
-  else
-    BOOST_CHECK( !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_CHECK( p.has_root_path() );
-  BOOST_CHECK( p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( !p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( !p.has_parent_path() );
-  BOOST_CHECK( !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_CHECK( p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( !p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( !p.has_parent_path() );
-  if ( platform == "POSIX" )
-    BOOST_CHECK( p.is_complete() );
-  else
-    BOOST_CHECK( !p.is_complete() );
-
-  p = ".";
-  BOOST_CHECK( p.relative_path().string() == "." );
-  BOOST_CHECK( p.parent_path().string() == "" );
-  BOOST_CHECK( p.filename() == "." );
-  BOOST_CHECK( p.root_name() == "" );
-  BOOST_CHECK( p.root_directory() == "" );
-  BOOST_CHECK( p.root_path().string() == "" );
-  BOOST_CHECK( !p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( !p.has_parent_path() );
-  BOOST_CHECK( !p.is_complete() );
-
-  p = "..";
-  BOOST_CHECK( p.relative_path().string() == ".." );
-  BOOST_CHECK( p.parent_path().string() == "" );
-  BOOST_CHECK( p.filename() == ".." );
-  BOOST_CHECK( p.root_name() == "" );
-  BOOST_CHECK( p.root_directory() == "" );
-  BOOST_CHECK( p.root_path().string() == "" );
-  BOOST_CHECK( !p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( !p.has_parent_path() );
-  BOOST_CHECK( !p.is_complete() );
-
-  p = "foo";
-  BOOST_CHECK( p.relative_path().string() == "foo" );
-  BOOST_CHECK( p.parent_path().string() == "" );
-  BOOST_CHECK( p.filename() == "foo" );
-  BOOST_CHECK( p.root_name() == "" );
-  BOOST_CHECK( p.root_directory() == "" );
-  BOOST_CHECK( p.root_path().string() == "" );
-  BOOST_CHECK( !p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( !p.has_parent_path() );
-  BOOST_CHECK( !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_CHECK( p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  if ( platform == "POSIX" )
-    BOOST_CHECK( p.is_complete() );
-  else
-    BOOST_CHECK( !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_CHECK( p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  if ( platform == "POSIX" )
-    BOOST_CHECK( p.is_complete() );
-  else
-    BOOST_CHECK( !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_CHECK( p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  if ( platform == "POSIX" )
-    BOOST_CHECK( p.is_complete() );
-  else
-    BOOST_CHECK( !p.is_complete() );
-
-  p = "foo/bar";
-  BOOST_CHECK( p.relative_path().string() == "foo/bar" );
-  BOOST_CHECK( p.parent_path().string() == "foo" );
-  BOOST_CHECK( p.filename() == "bar" );
-  BOOST_CHECK( p.root_name() == "" );
-  BOOST_CHECK( p.root_directory() == "" );
-  BOOST_CHECK( p.root_path().string() == "" );
-  BOOST_CHECK( !p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  BOOST_CHECK( !p.is_complete() );
-
-  p = "../foo";
-  BOOST_CHECK( p.relative_path().string() == "../foo" );
-  BOOST_CHECK( p.parent_path().string() == ".." );
-  BOOST_CHECK( p.filename() == "foo" );
-  BOOST_CHECK( p.root_name() == "" );
-  BOOST_CHECK( p.root_directory() == "" );
-  BOOST_CHECK( p.root_path().string() == "" );
-  BOOST_CHECK( !p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  BOOST_CHECK( !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_CHECK( !p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  BOOST_CHECK( !p.is_complete() );
-
-  p = "/foo/bar";
-  BOOST_CHECK( p.relative_path().string() == "foo/bar" );
-  BOOST_CHECK( p.parent_path().string() == "/foo" );
-  BOOST_CHECK( p.filename() == "bar" );
-  BOOST_CHECK( p.root_name() == "" );
-  BOOST_CHECK( p.root_directory() == "/" );
-  BOOST_CHECK( p.root_path().string() == "/" );
-  BOOST_CHECK( p.has_root_path() );
-  BOOST_CHECK( !p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  if ( platform == "POSIX" )
-    BOOST_CHECK( p.is_complete() );
-  else
-    BOOST_CHECK( !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_CHECK( p.has_root_path() );
-  BOOST_CHECK( p.has_root_name() );
-  BOOST_CHECK( !p.has_root_directory() );
-  BOOST_CHECK( !p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( !p.has_parent_path() );
-  BOOST_CHECK( !p.is_complete() );
-
-  p = path( "//net/" );
-  BOOST_CHECK( p.relative_path().string() == "" );
-  BOOST_CHECK( p.parent_path().string() == "//net" );
-  BOOST_CHECK( p.filename() == "/" );
-  BOOST_CHECK( p.root_name() == "//net" );
-  BOOST_CHECK( p.root_directory() == "/" );
-  BOOST_CHECK( p.root_path().string() == "//net/" );
-  BOOST_CHECK( p.has_root_path() );
-  BOOST_CHECK( p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( !p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  BOOST_CHECK( p.is_complete() );
-
-  p = path( "//net/foo" );
-  BOOST_CHECK( p.relative_path().string() == "foo" );
-  BOOST_CHECK( p.parent_path().string() == "//net/" );
-  BOOST_CHECK( p.filename() == "foo" );
-  BOOST_CHECK( p.root_name() == "//net" );
-  BOOST_CHECK( p.root_directory() == "/" );
-  BOOST_CHECK( p.root_path().string() == "//net/" );
-  BOOST_CHECK( p.has_root_path() );
-  BOOST_CHECK( p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  BOOST_CHECK( 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_CHECK( p.has_root_path() );
-  BOOST_CHECK( p.has_root_name() );
-  BOOST_CHECK( p.has_root_directory() );
-  BOOST_CHECK( p.has_relative_path() );
-  BOOST_CHECK( p.has_filename() );
-  BOOST_CHECK( p.has_parent_path() );
-  BOOST_CHECK( 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_CHECK( p.relative_path().string() == "" );
-    BOOST_CHECK( p.parent_path().string() == "" );
-    BOOST_CHECK( p.filename() == "c:" );
-    BOOST_CHECK( p.root_name() == "c:" );
-    BOOST_CHECK( p.root_directory() == "" );
-    BOOST_CHECK( p.root_path().string() == "c:" );
-    BOOST_CHECK( p.has_root_path() );
-    BOOST_CHECK( p.has_root_name() );
-    BOOST_CHECK( !p.has_root_directory() );
-    BOOST_CHECK( !p.has_relative_path() );
-    BOOST_CHECK( p.has_filename() );
-    BOOST_CHECK( !p.has_parent_path() );
-    BOOST_CHECK( !p.is_complete() );
-
-    p = path( "c:foo" );
-    BOOST_CHECK( p.relative_path().string() == "foo" );
-    BOOST_CHECK( p.parent_path().string() == "c:" );
-    BOOST_CHECK( p.filename() == "foo" );
-    BOOST_CHECK( p.root_name() == "c:" );
-    BOOST_CHECK( p.root_directory() == "" );
-    BOOST_CHECK( p.root_path().string() == "c:" );
-    BOOST_CHECK( p.has_root_path() );
-    BOOST_CHECK( p.has_root_name() );
-    BOOST_CHECK( !p.has_root_directory() );
-    BOOST_CHECK( p.has_relative_path() );
-    BOOST_CHECK( p.has_filename() );
-    BOOST_CHECK( p.has_parent_path() );
-    BOOST_CHECK( !p.is_complete() );
-
-    p = path( "c:/" );
-    BOOST_CHECK( p.relative_path().string() == "" );
-    BOOST_CHECK( p.parent_path().string() == "c:" );
-    BOOST_CHECK( p.filename() == "/" );
-    BOOST_CHECK( p.root_name() == "c:" );
-    BOOST_CHECK( p.root_directory() == "/" );
-    BOOST_CHECK( p.root_path().string() == "c:/" );
-    BOOST_CHECK( p.has_root_path() );
-    BOOST_CHECK( p.has_root_name() );
-    BOOST_CHECK( p.has_root_directory() );
-    BOOST_CHECK( !p.has_relative_path() );
-    BOOST_CHECK( p.has_filename() );
-    BOOST_CHECK( p.has_parent_path() );
-    BOOST_CHECK( p.is_complete() );
-
-    p = path( "c:.." );
-    BOOST_CHECK( p.relative_path().string() == ".." );
-    BOOST_CHECK( p.parent_path().string() == "c:" );
-    BOOST_CHECK( p.filename() == ".." );
-    BOOST_CHECK( p.root_name() == "c:" );
-    BOOST_CHECK( p.root_directory() == "" );
-    BOOST_CHECK( p.root_path().string() == "c:" );
-    BOOST_CHECK( p.has_root_path() );
-    BOOST_CHECK( p.has_root_name() );
-    BOOST_CHECK( !p.has_root_directory() );
-    BOOST_CHECK( p.has_relative_path() );
-    BOOST_CHECK( p.has_filename() );
-    BOOST_CHECK( p.has_parent_path() );
-    BOOST_CHECK( !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_CHECK( p.has_root_path() );
-    BOOST_CHECK( p.has_root_name() );
-    BOOST_CHECK( p.has_root_directory() );
-    BOOST_CHECK( p.has_relative_path() );
-    BOOST_CHECK( p.has_filename() );
-    BOOST_CHECK( p.has_parent_path() );
-    BOOST_CHECK( 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_CHECK( p.has_root_path() );
-    BOOST_CHECK( p.has_root_name() );
-    BOOST_CHECK( p.has_root_directory() );
-    BOOST_CHECK( p.has_relative_path() );
-    BOOST_CHECK( p.has_filename() );
-    BOOST_CHECK( p.has_parent_path() );
-    BOOST_CHECK( 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_CHECK( p.has_root_path() );
-    BOOST_CHECK( p.has_root_name() );
-    BOOST_CHECK( p.has_root_directory() );
-    BOOST_CHECK( p.has_relative_path() );
-    BOOST_CHECK( p.has_filename() );
-    BOOST_CHECK( p.has_parent_path() );
-    BOOST_CHECK( p.is_complete() );
-
-    p = path( "prn:" );
-    BOOST_CHECK( p.relative_path().string() == "" );
-    BOOST_CHECK( p.parent_path().string() == "" );
-    BOOST_CHECK( p.filename() == "prn:" );
-    BOOST_CHECK( p.root_name() == "prn:" );
-    BOOST_CHECK( p.root_directory() == "" );
-    BOOST_CHECK( p.root_path().string() == "prn:" );
-    BOOST_CHECK( p.has_root_path() );
-    BOOST_CHECK( p.has_root_name() );
-    BOOST_CHECK( !p.has_root_directory() );
-    BOOST_CHECK( !p.has_relative_path() );
-    BOOST_CHECK( p.has_filename() );
-    BOOST_CHECK( !p.has_parent_path() );
-    BOOST_CHECK( !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" );
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/libs/filesystem/test/wide_test.cpp   Mon Nov 24 07:20:31 2008
+++ /dev/null
@@ -1,161 +0,0 @@
-// 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
-
-#include <boost/config/warning_disable.hpp>
-
-//  See deprecated_test for tests of deprecated features
-#define BOOST_FILESYSTEM_NO_DEPRECATED
-
-#include <boost/filesystem/config.hpp>
-# ifdef BOOST_FILESYSTEM_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/test/minimal.hpp>
-
-#include "../src/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 )
-      throw fs::basic_filesystem_error<Path>( "wide_test create_file",
-        ph,
-        boost::system::error_code( errno, boost::system::errno_ecat ) );
-    if ( !contents.empty() ) f << contents;
-  }
-
-  template< class Path >
-  void test( const Path & dir, const Path & file, const Path & dot )
-  {
-    Path tmp;
-    tmp = file;
-    BOOST_CHECK( tmp == file );
-    tmp = file.string();
-    BOOST_CHECK( tmp == file );
-    tmp = file.string().c_str();
-    BOOST_CHECK( tmp == file );
-    fs::initial_path<Path>();
-    fs::current_path<Path>();
-    fs::remove( dir / file );
-    fs::remove( dir );
-    BOOST_CHECK( !fs::exists( dir / file ) );
-    BOOST_CHECK( !fs::exists( dir ) );
-    BOOST_CHECK( fs::create_directory( dir ) );
-    BOOST_CHECK( fs::exists( dir ) );
-    BOOST_CHECK( fs::is_directory( dir ) );
-    BOOST_CHECK( fs::is_empty( dir ) );
-    create_file( dir / file, "wide_test file contents" );
-    BOOST_CHECK( fs::exists( dir / file ) );
-    BOOST_CHECK( !fs::is_directory( dir / file ) );
-    BOOST_CHECK( !fs::is_empty( dir / file ) );
- BOOST_CHECK( fs::file_size( dir / file ) == 23 || fs::file_size( dir / file ) == 24 );
-    BOOST_CHECK( fs::equivalent( dir / file, dot / dir / file ) );
-    BOOST_CHECK( 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_CHECK( it->path() == dir / file );
-      BOOST_CHECK( !fs::is_empty( it->path() ) );
-      ++count;
-    }
-    BOOST_CHECK( 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
-
-// test_main ---------------------------------------------------------------//
-
-int test_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_CHECK( to_external( L"\x2780" ).size() == 3 );
-  BOOST_CHECK( 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 0;
-}

Other related posts:

  • » [boost-doc-zh] r426 committed - 升级至1.44.0,libs/filesystem 下的目录变 - boost-doc-zh