Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71666 - in branches/release: boost boost/filesystem boost/filesystem/v3 libs/filesystem libs/filesystem/v2/test libs/filesystem/v3/doc libs/filesystem/v3/src libs/filesystem/v3/test libs/filesystem/v3/test/msvc10 libs/filesystem/v3/test/msvc10/long_path_test libs/filesystem/v3/test/msvc10/stems
From: bdawes_at_[hidden]
Date: 2011-05-02 09:09:57


Author: bemandawes
Date: 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
New Revision: 71666
URL: http://svn.boost.org/trac/boost/changeset/71666

Log:
Merge trunk
Added:
   branches/release/libs/filesystem/v3/test/msvc10/long_path_test/
      - copied from r71665, /trunk/libs/filesystem/v3/test/msvc10/long_path_test/
   branches/release/libs/filesystem/v3/test/msvc10/stems/
      - copied from r71665, /trunk/libs/filesystem/v3/test/msvc10/stems/
Properties modified:
   branches/release/boost/filesystem/ (props changed)
   branches/release/boost/filesystem.hpp (props changed)
   branches/release/libs/filesystem/ (props changed)
Text files modified:
   branches/release/boost/filesystem/v3/operations.hpp | 34 +++++++++-----
   branches/release/libs/filesystem/v2/test/fstream_test.cpp | 4
   branches/release/libs/filesystem/v2/test/operations_test.cpp | 2
   branches/release/libs/filesystem/v3/doc/reference.html | 37 +++++++++++++++
   branches/release/libs/filesystem/v3/src/operations.cpp | 9 ++-
   branches/release/libs/filesystem/v3/src/path.cpp | 29 +++++++++---
   branches/release/libs/filesystem/v3/test/fstream_test.cpp | 2
   branches/release/libs/filesystem/v3/test/msvc10/filesystem-v3.sln | 20 ++++++++
   branches/release/libs/filesystem/v3/test/operations_test.cpp | 6 ++
   branches/release/libs/filesystem/v3/test/path_test.cpp | 92 +++++++++++++++++++++++++++++++++++++--
   10 files changed, 200 insertions(+), 35 deletions(-)

Modified: branches/release/boost/filesystem/v3/operations.hpp
==============================================================================
--- branches/release/boost/filesystem/v3/operations.hpp (original)
+++ branches/release/boost/filesystem/v3/operations.hpp 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -623,7 +623,7 @@
       directory_entry,
       boost::single_pass_traversal_tag >::reference dereference() const
     {
- BOOST_ASSERT(m_imp.get() && "attempt to dereference end iterator");
+ BOOST_ASSERT_MSG(m_imp.get(), "attempt to dereference end iterator");
       return m_imp->dir_entry;
     }
 
@@ -706,7 +706,8 @@
     inline
     void recur_dir_itr_imp::pop()
     {
- BOOST_ASSERT(m_level > 0 && "pop() on recursive_directory_iterator with level < 1");
+ BOOST_ASSERT_MSG(m_level > 0,
+ "pop() on recursive_directory_iterator with level < 1");
 
       do
       {
@@ -766,20 +767,23 @@
 
     recursive_directory_iterator& increment(system::error_code& ec)
     {
- BOOST_ASSERT(m_imp.get() && "increment() on end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "increment() on end recursive_directory_iterator");
       m_imp->increment(&ec);
       return *this;
     }
 
     int level() const
     {
- BOOST_ASSERT(m_imp.get() && "level() on end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "level() on end recursive_directory_iterator");
       return m_imp->m_level;
     }
 
     bool no_push_pending() const
     {
- BOOST_ASSERT(m_imp.get() && "is_no_push_requested() on end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "is_no_push_requested() on end recursive_directory_iterator");
       return (m_imp->m_options & symlink_option::_detail_no_push)
         == symlink_option::_detail_no_push;
     }
@@ -790,14 +794,16 @@
 
     void pop()
     {
- BOOST_ASSERT(m_imp.get() && "pop() on end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "pop() on end recursive_directory_iterator");
       m_imp->pop();
       if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator
     }
 
     void no_push(bool value=true)
     {
- BOOST_ASSERT(m_imp.get() && "no_push() on end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "no_push() on end recursive_directory_iterator");
       if (value)
         m_imp->m_options |= symlink_option::_detail_no_push;
       else
@@ -806,15 +812,15 @@
 
     file_status status() const
     {
- BOOST_ASSERT(m_imp.get()
- && "status() on end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "status() on end recursive_directory_iterator");
       return m_imp->m_stack.top()->status();
     }
 
     file_status symlink_status() const
     {
- BOOST_ASSERT(m_imp.get()
- && "symlink_status() on end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "symlink_status() on end recursive_directory_iterator");
       return m_imp->m_stack.top()->symlink_status();
     }
 
@@ -832,13 +838,15 @@
       boost::single_pass_traversal_tag >::reference
     dereference() const
     {
- BOOST_ASSERT(m_imp.get() && "dereference of end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "dereference of end recursive_directory_iterator");
       return *m_imp->m_stack.top();
     }
 
     void increment()
     {
- BOOST_ASSERT(m_imp.get() && "increment of end recursive_directory_iterator");
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "increment of end recursive_directory_iterator");
       m_imp->increment(0);
       if (m_imp->m_stack.empty())
         m_imp.reset(); // done, so make end iterator

Modified: branches/release/libs/filesystem/v2/test/fstream_test.cpp
==============================================================================
--- branches/release/libs/filesystem/v2/test/fstream_test.cpp (original)
+++ branches/release/libs/filesystem/v2/test/fstream_test.cpp 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -157,7 +157,7 @@
 
   // test fs::path
   std::cout << "path tests:\n";
- test( fs::path( "fstream_test_foo" ) );
+ test( fs::path( "v2_fstream_test" ) );
 
 #ifndef BOOST_FILESYSTEM2_NARROW_ONLY
 
@@ -170,7 +170,7 @@
   // 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( fs::wpath( L"v2_fstream_test_\x2780" ) );
 
   // test user supplied basic_path
   const long lname[] = { 'f', 's', 'r', 'e', 'a', 'm', '_', 't', 'e', 's',

Modified: branches/release/libs/filesystem/v2/test/operations_test.cpp
==============================================================================
--- branches/release/libs/filesystem/v2/test/operations_test.cpp (original)
+++ branches/release/libs/filesystem/v2/test/operations_test.cpp 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -74,7 +74,7 @@
 
   unsigned short language_id; // 0 except for Windows
 
- const char * temp_dir_name = "temp_fs_test_dir";
+ const char * temp_dir_name = "v2_operations_test";
 
   void create_file( const fs::path & ph, const std::string & contents )
   {

Modified: branches/release/libs/filesystem/v3/doc/reference.html
==============================================================================
--- branches/release/libs/filesystem/v3/doc/reference.html (original)
+++ branches/release/libs/filesystem/v3/doc/reference.html 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -124,6 +124,8 @@
     <td width="34%" valign="top">
     <a href="#File-streams">File streams</a><br>
 <a href="#Path-decomposition-table">Path decomposition table</a><br>
+ <a href="#long-path-warning">Warning: Long paths on Windows and the
+ extended-length <b>\\?\ </b>prefix</a><br>
 <a href="#Acknowledgements">Acknowledgements</a><br>
 <a href="#References">References</a><br>
 &nbsp;</td>
@@ -3225,6 +3227,37 @@
 <td><span style="background-color: #CCFFCC"><code>foo\bar</code><br><code>bar</code></span></td>
 </tr>
 </table>
+<h2><a name="long-path-warning"></a>Warning: Long paths on Windows and the
+extended-length <b>\\?\ </b>prefix</h2>
+<p>The Microsoft Windows &quot;Maximum Path Length Limitation&quot; specifies:</p>
+<blockquote>
+<p>In the Windows API (with some exceptions ...), the maximum length for a path
+is MAX_PATH, which is defined as 260 characters.</p>
+<p>The Windows API has many functions that also have Unicode versions to permit
+an extended-length path for a maximum total path length of 32,767 characters.
+... To specify an extended-length path, use the <b>&quot;\\?\&quot; prefix</b>. For
+example, &quot;\\?\D:\very long path&quot;.&nbsp;
+<i>[C++ string literals require backslashes be doubled, of course.]</i></p>
+</blockquote>
+<p>Because most Boost.Filesystem operational functions just pass the contents of
+a class path object to the Windows API, they do work with the extended-length
+prefixes. But some won't work, because to the limitations imposed by Windows.
+Read the following cautions carefully!</p>
+<h3>Cautions for paths with extended-length prefixes</h3>
+<ul>
+ <li>Individual components of a path are still are limited to whatever is
+ supported for the particular filesystem, commonly 255 characters.</li>
+ <li>Only backslashes only are acceptable as directory separators. Slashes are
+ not treated as separators.</li>
+ <li>All paths must be absolute - relative paths are not allowed.</li>
+ <li>Once an absolute path grows beyond 260 characters, it is essentially
+ poisoned and all operations must use extended-length prefixes. So even a
+ simple operation like <code>create_directory(&quot;a&quot;)</code> will fail if the
+ absolute path of the resulting directory would exceed 260 characters.</li>
+ <li>Certain Boost.Filesystem functions that decompose their argument path and
+ then work on individual relative directories or files will not work properly
+ with extended-length prefix paths.</li>
+</ul>
 <h2><a name="Acknowledgements">Acknowledgements</a></h2>
 <p>This Filesystem Library is dedicated to my wife, Sonda, who provided the
 support necessary to see both a trial implementation and the proposal itself
@@ -3265,11 +3298,11 @@
   </tr>
 </table>
 <hr>
-<p>© Copyright Beman Dawes, 2002, 2006, 2007, 2009, 2010</p>
+<p>© Copyright Beman Dawes, 2002, 2006, 2007, 2009, 2010</p>
 <p>Distributed under the Boost Software License, Version 1.0. See
 <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p>
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->25 February 2011<!--webbot bot="Timestamp" endspan i-checksum="40677" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->12 April 2011<!--webbot bot="Timestamp" endspan i-checksum="28281" --></p>
 
 </body>
 

Modified: branches/release/libs/filesystem/v3/src/operations.cpp
==============================================================================
--- branches/release/libs/filesystem/v3/src/operations.cpp (original)
+++ branches/release/libs/filesystem/v3/src/operations.cpp 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -30,7 +30,7 @@
 # define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this
 #endif
 
-#if !(defined(__HP_aCC) && defined(_ILP32) && \
+#if !defined(__QNXNTO__) && !(defined(__HP_aCC) && defined(_ILP32) && \
       !defined(_STATVFS_ACPP_PROBLEMS_FIXED))
 #define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect,
 #endif
@@ -182,6 +182,9 @@
 #include <string>
 #include <cstring>
 #include <cstdio> // for remove, rename
+#if defined(__QNXNTO__) // see ticket #5355
+# include <stdio.h>
+#endif
 #include <cerrno>
 #include <cassert>
 // #include <iostream> // for debugging only; comment out when not in use
@@ -1923,8 +1926,8 @@
   void directory_iterator_increment(directory_iterator& it,
     system::error_code* ec)
   {
- BOOST_ASSERT(it.m_imp.get() && "attempt to increment end iterator");
- BOOST_ASSERT(it.m_imp->handle != 0 && "internal program error");
+ BOOST_ASSERT_MSG(it.m_imp.get(), "attempt to increment end iterator");
+ BOOST_ASSERT_MSG(it.m_imp->handle != 0, "internal program error");
     
     path::string_type filename;
     file_status file_stat, symlink_file_stat;

Modified: branches/release/libs/filesystem/v3/src/path.cpp
==============================================================================
--- branches/release/libs/filesystem/v3/src/path.cpp (original)
+++ branches/release/libs/filesystem/v3/src/path.cpp 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -84,6 +84,7 @@
   const wchar_t* preferred_separator_string = L"\\";
   const wchar_t colon = L':';
   const wchar_t dot = L'.';
+ const wchar_t questionmark = L'?';
   const fs::path dot_path(L".");
   const fs::path dot_dot_path(L"..");
 
@@ -159,14 +160,14 @@
   const std::string path::generic_string(const codecvt_type& cvt) const
   {
     path tmp(*this);
- tmp.make_preferred();
+ std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/');
     return tmp.string(cvt);
   }
 
   const std::wstring path::generic_wstring() const
   {
     path tmp(*this);
- tmp.make_preferred();
+ std::replace(tmp.m_pathname.begin(), tmp.m_pathname.end(), L'\\', L'/');
     return tmp.wstring();
   }
 
@@ -207,7 +208,7 @@
 # ifdef BOOST_WINDOWS_API
   path & path::make_preferred()
   {
- std::replace(m_pathname.begin(), m_pathname.end(), L'\\', L'/');
+ std::replace(m_pathname.begin(), m_pathname.end(), L'/', L'\\');
     return *this;
   }
 # endif
@@ -427,8 +428,8 @@
   bool is_non_root_separator(const string_type & str, size_type pos)
     // pos is position of the separator
   {
- BOOST_ASSERT(!str.empty() && is_separator(str[pos])
- && "precondition violation");
+ BOOST_ASSERT_MSG(!str.empty() && is_separator(str[pos]),
+ "precondition violation");
 
     // subsequent logic expects pos to be for leftmost slash of a set
     while (pos > 0 && is_separator(str[pos-1]))
@@ -490,6 +491,19 @@
       && is_separator(path[0])
       && is_separator(path[1])) return string_type::npos;
 
+# ifdef BOOST_WINDOWS_API
+ // case "\\?\"
+ if (size > 4
+ && is_separator(path[0])
+ && is_separator(path[1])
+ && path[2] == questionmark
+ && is_separator(path[3]))
+ {
+ string_type::size_type pos(path.find_first_of(separators, 4));
+ return pos < size ? pos : string_type::npos;
+ }
+# endif
+
     // case "//net {/}"
     if (size > 3
       && is_separator(path[0])
@@ -607,7 +621,8 @@
 
   void path::m_path_iterator_increment(path::iterator & it)
   {
- BOOST_ASSERT(it.m_pos < it.m_path_ptr->m_pathname.size() && "path::basic_iterator increment past end()");
+ BOOST_ASSERT_MSG(it.m_pos < it.m_path_ptr->m_pathname.size(),
+ "path::basic_iterator increment past end()");
 
     // increment to position past current element
     it.m_pos += it.m_element.m_pathname.size();
@@ -663,7 +678,7 @@
 
   void path::m_path_iterator_decrement(path::iterator & it)
   {
- BOOST_ASSERT(it.m_pos && "path::iterator decrement past begin()");
+ BOOST_ASSERT_MSG(it.m_pos, "path::iterator decrement past begin()");
 
     size_type end_pos(it.m_pos);
 

Modified: branches/release/libs/filesystem/v3/test/fstream_test.cpp
==============================================================================
--- branches/release/libs/filesystem/v3/test/fstream_test.cpp (original)
+++ branches/release/libs/filesystem/v3/test/fstream_test.cpp 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -154,7 +154,7 @@
 
   // test narrow characters
   std::cout << "narrow character tests:\n";
- test("fstream_test_foo");
+ test("v3_fstream_test");
 
 
   // So that tests are run with known encoding, use Boost UTF-8 codecvt

Modified: branches/release/libs/filesystem/v3/test/msvc10/filesystem-v3.sln
==============================================================================
--- branches/release/libs/filesystem/v3/test/msvc10/filesystem-v3.sln (original)
+++ branches/release/libs/filesystem/v3/test/msvc10/filesystem-v3.sln 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -59,6 +59,18 @@
                 {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1}
         EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stems", "stems\stems.vcxproj", "{23C735E1-0195-467F-BE9F-314829402FCF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1}
+ {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "long_path_test", "long_path_test\long_path_test.vcxproj", "{1A6A7DAF-8705-4B2B-83B5-93F84A63496C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1}
+ {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1}
+ EndProjectSection
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -138,6 +150,14 @@
                 {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}.Debug|Win32.Build.0 = Debug|Win32
                 {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}.Release|Win32.ActiveCfg = Release|Win32
                 {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}.Release|Win32.Build.0 = Release|Win32
+ {23C735E1-0195-467F-BE9F-314829402FCF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {23C735E1-0195-467F-BE9F-314829402FCF}.Debug|Win32.Build.0 = Debug|Win32
+ {23C735E1-0195-467F-BE9F-314829402FCF}.Release|Win32.ActiveCfg = Release|Win32
+ {23C735E1-0195-467F-BE9F-314829402FCF}.Release|Win32.Build.0 = Release|Win32
+ {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}.Debug|Win32.Build.0 = Debug|Win32
+ {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}.Release|Win32.ActiveCfg = Release|Win32
+ {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Modified: branches/release/libs/filesystem/v3/test/operations_test.cpp
==============================================================================
--- branches/release/libs/filesystem/v3/test/operations_test.cpp (original)
+++ branches/release/libs/filesystem/v3/test/operations_test.cpp 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -74,6 +74,10 @@
   return SetEnvironmentVariableW(convert(name).c_str(), 0);
 }
 
+#else
+
+#include <stdlib.h> // allow unqualifed calls to env funcs on SunOS
+
 #endif
 
 // on Windows, except for standard libaries known to have wchar_t overloads for
@@ -107,7 +111,7 @@
 
   unsigned short language_id; // 0 except for Windows
 
- const char* temp_dir_name = "temp_fs_test_dir";
+ const char* temp_dir_name = "v3_operations_test";
 
   void create_file(const fs::path & ph, const std::string & contents)
   {

Modified: branches/release/libs/filesystem/v3/test/path_test.cpp
==============================================================================
--- branches/release/libs/filesystem/v3/test/path_test.cpp (original)
+++ branches/release/libs/filesystem/v3/test/path_test.cpp 2011-05-02 09:09:56 EDT (Mon, 02 May 2011)
@@ -13,6 +13,17 @@
 // on basename(), extension(), and change_extension() tests from the original
 // convenience_test.cpp by Vladimir Prus.
 
+//--------------------------------------------------------------------------------------//
+// //
+// Caution //
+// //
+// The class path relational operators (==, !=, <, etc.) on Windows treat slash and //
+// backslash as equal. Thus any tests on Windows where the difference between slash //
+// and backslash is significant should compare based on native observers rather than //
+// directly on path objects. //
+// //
+//--------------------------------------------------------------------------------------//
+
 #define BOOST_FILESYSTEM_VERSION 3
 
 #include <boost/config.hpp>
@@ -415,11 +426,11 @@
     if (platform == "Windows")
     {
       BOOST_TEST(path("foo\\bar") == "foo/bar");
- BOOST_TEST((b / a).string() == "b\\a");
- BOOST_TEST((bs / a).string() == "b\\a");
- BOOST_TEST((bcs / a).string() == "b\\a");
- BOOST_TEST((b / as).string() == "b\\a");
- BOOST_TEST((b / acs).string() == "b\\a");
+ BOOST_TEST((b / a).native() == path("b\\a").native());
+ BOOST_TEST((bs / a).native() == path("b\\a").native());
+ BOOST_TEST((bcs / a).native() == path("b\\a").native());
+ BOOST_TEST((b / as).native() == path("b\\a").native());
+ BOOST_TEST((b / acs).native() == path("b\\a").native());
       PATH_CHECK(path("a") / "b", "a\\b");
       PATH_CHECK(path("..") / "", "..");
       PATH_CHECK(path("foo") / path("bar"), "foo\\bar"); // path arg
@@ -1059,6 +1070,26 @@
 
     if (platform == "Windows")
     {
+
+ //p = q = L"\\\\?\\";
+ //BOOST_TEST(p.relative_path().string() == "");
+ //BOOST_TEST(p.parent_path().string() == "");
+ //BOOST_TEST_EQ(q.remove_filename().string(), p.parent_path().string());
+ //BOOST_TEST(p.filename() == "");
+ //BOOST_TEST(p.stem() == "");
+ //BOOST_TEST(p.extension() == "");
+ //BOOST_TEST(p.root_name() == "");
+ //BOOST_TEST(p.root_directory() == "");
+ //BOOST_TEST(p.root_path().string() == "");
+ //BOOST_TEST(!p.has_root_path());
+ //BOOST_TEST(!p.has_root_name());
+ //BOOST_TEST(!p.has_root_directory());
+ //BOOST_TEST(!p.has_relative_path());
+ //BOOST_TEST(!p.has_filename());
+ //BOOST_TEST(!p.has_stem());
+ //BOOST_TEST(!p.has_extension());
+ //BOOST_TEST(!p.has_parent_path());
+ //BOOST_TEST(!p.is_absolute());
 
       p = q = path("c:");
       BOOST_TEST(p.relative_path().string() == "");
@@ -1075,6 +1106,22 @@
       BOOST_TEST(p.has_filename());
       BOOST_TEST(!p.has_parent_path());
       BOOST_TEST(!p.is_absolute());
+
+ //p = q = path(L"\\\\?\\c:");
+ //BOOST_TEST(p.relative_path().string() == "");
+ //BOOST_TEST(p.parent_path().string() == "");
+ //BOOST_TEST_EQ(q.remove_filename().string(), p.parent_path().string());
+ //BOOST_TEST(p.filename() == "c:");
+ //BOOST_TEST(p.root_name() == "c:");
+ //BOOST_TEST(p.root_directory() == "");
+ //BOOST_TEST(p.root_path().string() == "c:");
+ //BOOST_TEST(p.has_root_path());
+ //BOOST_TEST(p.has_root_name());
+ //BOOST_TEST(!p.has_root_directory());
+ //BOOST_TEST(!p.has_relative_path());
+ //BOOST_TEST(p.has_filename());
+ //BOOST_TEST(!p.has_parent_path());
+ //BOOST_TEST(!p.is_absolute());
 
       p = q = path("c:foo");
       BOOST_TEST(p.relative_path().string() == "foo");
@@ -1091,6 +1138,22 @@
       BOOST_TEST(p.has_filename());
       BOOST_TEST(p.has_parent_path());
       BOOST_TEST(!p.is_absolute());
+
+ //p = q = path(L"\\\\?\\c:foo");
+ //BOOST_TEST(p.relative_path().string() == "foo");
+ //BOOST_TEST(p.parent_path().string() == "c:");
+ //BOOST_TEST_EQ(q.remove_filename().string(), p.parent_path().string());
+ //BOOST_TEST(p.filename() == "foo");
+ //BOOST_TEST(p.root_name() == "c:");
+ //BOOST_TEST(p.root_directory() == "");
+ //BOOST_TEST(p.root_path().string() == "c:");
+ //BOOST_TEST(p.has_root_path());
+ //BOOST_TEST(p.has_root_name());
+ //BOOST_TEST(!p.has_root_directory());
+ //BOOST_TEST(p.has_relative_path());
+ //BOOST_TEST(p.has_filename());
+ //BOOST_TEST(p.has_parent_path());
+ //BOOST_TEST(!p.is_absolute());
    
       p = q = path("c:/");
       BOOST_TEST(p.relative_path().string() == "");
@@ -1567,6 +1630,24 @@
     BOOST_TEST(path("a/b").replace_extension(".c") == "a/b.c");
     BOOST_TEST_EQ(path("a.txt/b").replace_extension(".c"), "a.txt/b.c"); // ticket 4702
   }
+
+ // make_preferred_tests ------------------------------------------------------------//
+
+ void make_preferred_tests()
+ {
+ std::cout << "make_preferred_tests..." << std::endl;
+
+ if (platform == "Windows")
+ {
+ BOOST_TEST(path("//abc\\def/ghi").make_preferred().native()
+ == path("\\\\abc\\def\\ghi").native());
+ }
+ else
+ {
+ BOOST_TEST(path("//abc\\def/ghi").make_preferred().native()
+ == path("//abc\\def/ghi").native());
+ }
+ }
 
 } // unnamed namespace
 
@@ -1605,6 +1686,7 @@
   exception_tests();
   name_function_tests();
   replace_extension_tests();
+ make_preferred_tests();
 
   // verify deprecated names still available
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk