mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
Updated readme, more tests, some typos in comments.
This commit is contained in:
parent
9ea5a8773b
commit
7e975a8f7f
@ -1,7 +1,7 @@
|
||||

|
||||
[](https://travis-ci.org/gulrak/filesystem)
|
||||
[](https://ci.appveyor.com/project/gulrak/filesystem)
|
||||

|
||||
[](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
|
||||
|
@ -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.
|
||||
//---------------------------------------------------------------------------------------
|
||||
|
@ -295,7 +295,7 @@ bool operator!=(TestAllocator<T> const& x, TestAllocator<U> 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<std::wstring>("foobar").length() == 6);
|
||||
CHECK(fs::detail::fromUtf8<std::wstring>("foobar") == L"foobar");
|
||||
CHECK(fs::detail::fromUtf8<std::wstring>(u8"föobar").length() == 6);
|
||||
CHECK(fs::detail::fromUtf8<std::wstring>(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]")
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user