reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 66bcce7f4d7adce4be6c3dc2f7f4deb9069f54de
parent 3833bac062ed0d31948bd80fe6c818dd3ff8f282
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Sun, 26 Jun 2016 00:00:21 -0400

partially test the FS namespace functions

Diffstat:
Atest/filesystem.cpp | 24++++++++++++++++++++++++
Mtest/index.cpp | 7-------
2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/test/filesystem.cpp b/test/filesystem.cpp @@ -0,0 +1,24 @@ +#include <catch.hpp> + +#include <filesystem.hpp> +#include <index.hpp> + +static const char *M = "[filesystem]"; + +#define RIPATH "test/indexes" + +TEST_CASE("unicode filename", M) { + UseRootPath root(RIPATH); + const Path &path = Index::pathFor("Новая папка"); + + SECTION("FS::open") { + FILE *file = FS::open(path); + REQUIRE(file); + fclose(file); + } + + SECTION("FS::mtime") { + time_t time; + REQUIRE(FS::mtime(path, &time)); + } +} diff --git a/test/index.cpp b/test/index.cpp @@ -87,13 +87,6 @@ TEST_CASE("future version", M) { } } -TEST_CASE("unicode index path", M) { - UseRootPath root(RIPATH); - - IndexPtr ri = Index::load("Новая папка"); - REQUIRE(ri->name() == "Новая папка"); -} - TEST_CASE("add a category", M) { Index ri("a"); Category *cat = new Category("a", &ri);