Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make cwk_path_change_extension more like std::filesystem::path #31

Open
ilobilo opened this issue Jun 15, 2022 · 0 comments
Open

make cwk_path_change_extension more like std::filesystem::path #31

ilobilo opened this issue Jun 15, 2022 · 0 comments

Comments

@ilobilo
Copy link

ilobilo commented Jun 15, 2022

std::filesystem::path::replace_extension vs cwalk_path_change_extension

"/foo/bar.jpg" + ".png"
expected: "/foo/bar.png", result: "/foo/bar.png"
Result: Success!

"/foo/bar.jpg" + "png"
expected: "/foo/bar.png", result: "/foo/bar.png"
Result: Success!

"/foo/bar.jpg" + "."
expected: "/foo/bar.", result: "/foo/bar."
Result: Success!

"/foo/bar.jpg" + ""
expected: "/foo/bar", result: "/foo/bar."
Result: Error!

"/foo/bar." + "png"
expected: "/foo/bar.png", result: "/foo/bar.png"
Result: Success!

"/foo/bar" + ".png"
expected: "/foo/bar.png", result: "/foo/bar.png"
Result: Success!

"/foo/bar" + "png"
expected: "/foo/bar.png", result: "/foo/bar.png"
Result: Success!

"/foo/bar" + "."
expected: "/foo/bar.", result: "/foo/bar."
Result: Success!

"/foo/bar" + ""
expected: "/foo/bar", result: "/foo/bar."
Result: Error!

"/foo/." + ".png"
expected: "/foo/..png", result: "/foo/.png"
Result: Error!

"/foo/." + "png"
expected: "/foo/..png", result: "/foo/.png"
Result: Error!

"/foo/." + "."
expected: "/foo/..", result: "/foo/."
Result: Error!

"/foo/." + ""
expected: "/foo/.", result: "/foo/."
Result: Success!

"/foo/" + ".png"
expected: "/foo/.png", result: "/foo.png/"
Result: Error!

"/foo/" + "png"
expected: "/foo/.png", result: "/foo.png/"
Result: Error!
@ilobilo ilobilo changed the title make cwk_path_change_extension more std::filesystem::path like make cwk_path_change_extension more like std::filesystem::path Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant