Commit Graph

77 Commits

Author SHA1 Message Date
Beman
4005870f9c Commit work-in-progress prior to merging into branch v4. (It is clear the class path refactoring is resulting in a cleaner, more correct implementation. So merge now even though the work is currently incomplete.) 2017-09-20 09:27:06 -04:00
Beman
3a19d97b5e Bring parent_path() into std compliance. Fix decomp_table boo boos. All decomposition_table_tests() now passing. 2017-09-17 11:37:09 -04:00
Beman
1750152680 path.hpp: refactor path::has_root_name(), has_root_directory(), and has relative_path().
path.cpp: refactor path::root_name(), root_directory(), and root_path().
path_test.cpp: bring decomposition_table into compliance with C++ Std WP. The decomposition tests for parent_path() are now failing, indicating that code needs to be brought into std compliance. There are many traditional tests failing, but these will be reviewed later.
2017-09-17 11:24:55 -04:00
Beman
080c99c425 Unstable work-in-progress. Commit before creating path-refactor branch. 2017-09-16 17:08:48 -04:00
Beman
d767a3e947 Add a table driven decomposition test. The plan is to migrate a lot of the handwritten decomposition and query tests to the table driven test. 2017-09-14 17:27:22 -04:00
Beman
e13d60104f Bring lexically_normal() into sync with C++ WP, N4687. Commit and push as backup in advance of hurricane Irma. 2017-09-10 10:56:27 -04:00
Beman
3a8554803f Add lexically_normal cases Nico suggested we concentrate on to resolve questions about invariants 2017-03-09 14:46:34 -05:00
Beman
65cc9b6aec Add the filename_tests() examples from the C++17 standard. 2017-02-16 09:21:46 -05:00
Beman
e5c8e732aa Reorder and number the lexically_normal tests so that they correspond to P0492R1. 2017-02-07 07:21:25 -05:00
Beman
d466406388 Update path.cpp to meet lexically_normal c++17 specs. Add test cases, including some from Nico. Add lexically_normal output to example/path_info.cpp 2017-01-29 08:35:14 -05:00
Beman
61d4f04eda Reflect V4 spec changes in deprecated_test.cpp. Clean up long_path_test.cpp. Add a few more query and decomposition test cases to path_test.cpp. 2017-01-25 05:43:51 -05:00
Beman
6dbbc24e90 Replace deprecated detail/lightweight_test.hpp with core/lightweight_main.hpp. 2017-01-23 07:15:30 -05:00
Beman
cf3cb4b372 Fix some path_test.cpp tests to conform to desired specs. Fix some path.cpp thinkos path::lexically_normal. All path_test.cpp tests now passing! 2017-01-22 18:00:13 -05:00
Beman
f9ffba8c41 Updated path_test.cpp cases where v4 spec has changed, and added new filename_tests() function to make sure path::filename() works correctly with the spec changes affecting root-name and root-directory elements. Fixed a line in path.cpp that had been commented out during development. 2017-01-22 12:35:30 -05:00
Beman
e0f05e471f Change path::filename() and has_filename() to conform to P0492. 2017-01-13 17:10:14 -05:00
Beman
602133fc92 Change path::stem() and path::extension() to conform with P0492 comment US-61 proposed wording. Add stem() and extension() test cases presented to LEWG by Nico in Issaquah. All tests passing, including treating ".profile" as a stem with no extension. 2017-01-09 16:33:19 -05:00
Beman
2f4b634c0c Add some stem() and extension() test cases 2016-11-02 17:03:03 -04:00
Felix Bruns
fcb98ee37e Rename generic() to generic_path(), since generic is a keyword in C++/CX.
When using Boost.Filesystem from a project compiled as C++/CX code,
compilation fails with a syntax error, because generic is a keyword.

    error C2059: syntax error: 'generic'

See section "Generic interfaces" in C++/CX here:

    https://msdn.microsoft.com/en-us/library/hh755792.aspx
2016-04-27 14:11:08 +02:00
Beman
3c344a5f0b Revert to lexical functions back to being members of class path. This is not the time to redesign the library's lexical vs operational conventions. It would break existing users mental model of lexical vs operational.
See doc/relative_proposal.html#Add-lexical-functions for additional rationale.
2015-10-25 13:28:49 -04:00
Beman
5610f974be Merge branch 'feature/relative2' into develop 2015-09-04 15:24:22 -04:00
Beman
e6d10cf716 Fix #10766, parent_path() with redundant separator returns wrong value, by adding examples and notes to the reference documentation to show why the returned value is in fact correct, and to provide rationale for that behavior. See [path.itr], and [path.decompose] parent_path() and filename() sections of the reference docs. 2015-09-03 10:44:20 -04:00
Beman
732609a2da Change member normal() and relative() to non-member lexically_normal() and lexically_relative(). See doc/relative_proposal.html#Add-lexical-functions-as-non-members for rationale. 2015-08-23 09:33:21 -04:00
Beman
cb11081a7d Finish initial proposed wording section of relative_proposal.html. Drive-by tweaks to other stuff. Add example/directory_symlink_parent_resolution.cpp, include/boost/filesystem/string_file.hpp, and related infrastructure. 2015-08-12 17:26:03 -04:00
Beman
34dd2c7718 Add a new path member function: "path normal() const;" and change the old deprecated normalize() non-const function to be implemented in terms of the new function. The implementation remains the same, except for returning by value rather than modifying in place. Motivation: Jamie Alsop has identified removal of redundant .. and . elements (i.e. normalization) as a need closely related to the relative path functionality requested by numerous Boost issue requests, the C++ LWG, and NB comments to the Filesystem TS. Given that both lexical and operational relative functionality is needed, there is less risk in providing a well-documented path::normal() lexical function. 2015-08-08 16:29:44 -04:00
Beman
dc794ea95b Merge branch 'feature/relative' into feature/relative2 2015-08-06 08:08:46 -04:00
Beman
bb5a0ff09d Clear warnings, including new warnings from VC++ 2015 preview. 2015-01-05 10:34:24 -05:00
Beman
f17852e98d Add test case described in ticket #4611. Behavior checked against the TS, and is working as specified. Closed the ticket as "wontfix", since there is no implementation defect. 2014-12-30 18:09:16 -05:00
Beman
bf1339e282 Remove use of <boost/test/prg_exec_monitor.hpp>. It has caused trouble for years, and I'm tired of fighting with it. The last straw was adding a Cygwin gcc toolset, only to have <boost/test/prg_exec_monitor.hpp> fail to link. Change to always use <boost/detail/lightweight_main.hpp>, which is trouble-free. 2014-08-06 12:16:06 -04:00
Beman
750a82e20d Revert "Merge branch 'develop' of github.com:boostorg/filesystem into develop"
This reverts commit 4610afc49e, reversing
changes made to 6623bde4fe.
2014-08-05 09:16:57 -04:00
Beman
99a94662b2 Merge branch 'develop' into ts-develop
Conflicts:
	include/boost/filesystem/operations.hpp
	test/operations_test.cpp
2014-07-22 20:55:58 -04:00
Beman
065f7b7948 Fix linking and namespace boo boos. All test/msvc/filesystem.sln tests now pass. 2014-07-10 15:21:02 -04:00
Beman
e59aecbcbe Update the tests. Unstable. 2014-07-09 08:57:45 -04:00
Beman
aa89af3387 Add test cases, correct typo 2014-05-05 14:23:59 -04:00
Beman Dawes
08c11663d9 Fix #7239, Stack overflow when calling create_directories(":D"). The reported problem was a symptom of an internal bug that caused path::filename() and path::parent_path() to fail on Windows for path(":"), and that in turn caused other functions that depend on filename() or parent_path() to fail, such as create_directories().
[SVN r80279]
2012-08-28 12:57:02 +00:00
Beman Dawes
6115c31640 Filesystem: Fix #6819; A path operand with a source that was a one character array was treated as empty, even if it wasn't empty. Such arrays can occur and be non-empty in unions or in code using C variable length array idioms.
[SVN r78136]
2012-04-22 15:07:08 +00:00
Beman Dawes
21ec949654 filesystem testing change: use <boost/test/prg_exec_monitor.hpp> by default, define BOOST_LIGHTWEIGHT_MAIN to use <boost/detail/lightweight_main.hpp>. This gives us the better exception reporting of <boost/test/prg_exec_monitor.hpp> but provides easy fallback to <boost/detail/lightweight_main.hpp> if desired.
[SVN r78057]
2012-04-18 01:31:53 +00:00
Beman Dawes
d99c7f051a Add a test case for 6690
[SVN r78005]
2012-04-16 13:01:30 +00:00
Beman Dawes
da4f223c5b Fix #6690 and #6737, resolving static linking related problems with VC++ 8 through 11. Note that this fix may reintroduce codecvt thread safety problems #4889, #6320, for these compilers if static linking is used.
[SVN r78000]
2012-04-15 20:34:19 +00:00
Beman Dawes
82c5b7533b Fix #4065, Boost Filesystem lexicographic path comparison inconsistent. The fix included adding path::compare functions, and cleanup and refactoring of the path relational operators code. Some of the code fixed is used by other functions, so some unrelated bugs may also have been fixed.
[SVN r77669]
2012-03-31 15:53:24 +00:00
Beman Dawes
494b34027e Fix #5118, replace_extension doesn't work as specified in documentation
[SVN r77571]
2012-03-26 21:19:36 +00:00
Beman Dawes
7941871477 Filesystem - Delete v3 directories no longer needed. Cleanup links, namespaces, and other residue from dual v2/v3 support.
[SVN r77555]
2012-03-26 12:44:24 +00:00
Beman Dawes
16099b4c7d Filesystem - Move V3 files and directories into place
[SVN r77554]
2012-03-26 12:31:06 +00:00
Beman Dawes
fa515c07f5 Move files into new v2 + v3 directory structure
[SVN r62653]
2010-06-09 13:00:15 +00:00
Beman Dawes
91715967a5 Upgrade system and filesystem to conform system_category and generic_category interface to N3090, the current C++0x working paper, section 19.5, System error support.
Refactor API macros into a new header, boost/system/api_config.hpp.

Prohibit user definition of API macros. Rationale: ensure all translation units use same definitions, cut number of environments that need to be tested.

[SVN r62313]
2010-05-30 15:38:32 +00:00
Beman Dawes
f0a2284419 Fix #3385, add test cases
[SVN r56139]
2009-09-10 17:25:20 +00:00
Beman Dawes
594e0c5d8e Filesystem: add basic_path::clear() to fix #3186, clear() missing
[SVN r54055]
2009-06-18 15:48:19 +00:00
Beman Dawes
7bc9e5db73 Filesystem: fix #3008, improving namespace discipline to avoid naming conflicts with the C++0x std library.
[SVN r52922]
2009-05-11 19:51:44 +00:00
Beman Dawes
0645bc1347 System, Filesystem: remove boost/detail/test_framework.hpp; use boost/detail/lightweight_test.hpp instead (Thanks to Peter Dimov for pointing this out)
[SVN r51966]
2009-03-25 12:11:47 +00:00
Beman Dawes
ae30e53a68 Filesystem: remove dependency on Boost.Test
[SVN r51959]
2009-03-24 15:33:31 +00:00
Beman Dawes
dff8252505 Filesystem: path operator==, !=; use string comparison rather than !(lhs < rhs) && !(rhs < lhs) because the result is the same yet the direct string compare is much more efficient than operator<, which uses lexicographical_compare.
[SVN r50674]
2009-01-19 18:38:28 +00:00