gcc/libstdc++-v3/testsuite/27_io
Jonathan Wakely 9c5365902a PR libstdc++/89117 fix path::replace_extension("") case
Previously the operator+=(extension) call would have re-parsed the path
and recreated the components with the right extension. Since optimising
it to not re-parse the whole string, we need to actually remove the
extension from the final filename before appending anything to it, and
append the dot to that final component too.

	PR libstdc++/89117
	* src/c++17/fs_path.cc (path::replace_extension): Erase extension from
	final component as well as from _M_pathname. Append the dot using
	operator+= instead of only to _M_pathname.
	(path::_M_find_extension): Reformat slightly.
	* testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
	Add more test cases.

From-SVN: r268406
2019-01-30 23:18:22 +00:00
..
basic_filebuf Update copyright years. 2019-01-01 13:31:55 +01:00
basic_fstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_ifstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_ios Update copyright years. 2019-01-01 13:31:55 +01:00
basic_iostream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_istream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_istringstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_ofstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_ostream Implement LWG 2221: formatted output operator for nullptr 2019-01-10 13:14:57 +00:00
basic_ostringstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_streambuf Update copyright years. 2019-01-01 13:31:55 +01:00
basic_stringbuf Update copyright years. 2019-01-01 13:31:55 +01:00
basic_stringstream Update copyright years. 2019-01-01 13:31:55 +01:00
filesystem PR libstdc++/89117 fix path::replace_extension("") case 2019-01-30 23:18:22 +00:00
fpos Update copyright years. 2019-01-01 13:31:55 +01:00
headers Update copyright years. 2019-01-01 13:31:55 +01:00
ios_base Update copyright years. 2019-01-01 13:31:55 +01:00
manipulators Update copyright years. 2019-01-01 13:31:55 +01:00
objects Update copyright years. 2019-01-01 13:31:55 +01:00
types Update copyright years. 2019-01-01 13:31:55 +01:00
rvalue_streams-2.cc Update copyright years. 2019-01-01 13:31:55 +01:00
rvalue_streams.cc Update copyright years. 2019-01-01 13:31:55 +01:00