diff --git a/README.md b/README.md index e575bc9..5c16741 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![Supported Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-blue.svg) [![Build Status](https://travis-ci.org/gulrak/filesystem.svg?branch=master)](https://travis-ci.org/gulrak/filesystem) [![Build status](https://ci.appveyor.com/api/projects/status/t07wp3k2cddo0hpo/branch/master?svg=true)](https://ci.appveyor.com/project/gulrak/filesystem) -![Latest Release Tag](https://img.shields.io/github/tag/gulrak/filesystem.svg) +[![Latest Release Tag](https://img.shields.io/github/tag/gulrak/filesystem.svg)](https://github.com/gulrak/filesystem/tree/v1.1.4) # Filesystem @@ -97,6 +97,11 @@ in the standard, and there might be issues in these implementations too. ## Usage +### Downloads + +The latest release version is [v1.1.4](https://github.com/gulrak/filesystem/tree/v1.1.4) and +source archives can be found [here](https://github.com/gulrak/filesystem/releases/tag/v1.1.4). + ### Using it as Single-File-Header As `ghc::filesystem` is at first a header-only library, it should be enough to copy the header diff --git a/include/ghc/fs_std.hpp b/include/ghc/fs_std.hpp index 2b500fb..9b54a0d 100644 --- a/include/ghc/fs_std.hpp +++ b/include/ghc/fs_std.hpp @@ -33,7 +33,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // //--------------------------------------------------------------------------------------- -// fs_std.hpp - The dynamic switching header for that includes std::filesystem if detected +// fs_std.hpp - The dynamic switching header that includes std::filesystem if detected // or ghc::filesystem if not, and makes the resulting API available in the // namespace fs. //--------------------------------------------------------------------------------------- diff --git a/test/filesystem_test.cpp b/test/filesystem_test.cpp index a485a03..f00dc8f 100644 --- a/test/filesystem_test.cpp +++ b/test/filesystem_test.cpp @@ -295,7 +295,7 @@ bool operator!=(TestAllocator const& x, TestAllocator const& y) noexcept return !(x == y); } -TEST_CASE("Temporary Directory", "[temp dir]") +TEST_CASE("Temporary Directory", "[fs.test.tempdir]") { fs::path tempPath; { @@ -307,6 +307,21 @@ TEST_CASE("Temporary Directory", "[temp dir]") REQUIRE(!fs::exists(tempPath)); } +#ifdef GHC_FILESYSTEM_VERSION +TEST_CASE("fs::detail::fromUf88", "[filesystem][fs.detail.utf8]") +{ + CHECK(fs::detail::fromUtf8("foobar").length() == 6); + CHECK(fs::detail::fromUtf8("foobar") == L"foobar"); + CHECK(fs::detail::fromUtf8(u8"föobar").length() == 6); + CHECK(fs::detail::fromUtf8(u8"föobar") == L"föobar"); + + CHECK(fs::detail::toUtf8(std::wstring(L"foobar")).length() == 6); + CHECK(fs::detail::toUtf8(std::wstring(L"foobar")) == "foobar"); + CHECK(fs::detail::toUtf8(std::wstring(L"föobar")).length() == 7); + CHECK(fs::detail::toUtf8(std::wstring(L"föobar")) == u8"föobar"); +} +#endif + #ifndef GHC_OS_WINDOWS TEST_CASE("30.10.8.1 path(\"//host\").has_root_name()", "[filesystem][path][fs.path.generic]") {