56 fs::path f = temp.
makeFile(
"Lumiera.nix");
57 CHECK (fs::exists(f));
58 CHECK (f.filename() ==
"Lumiera.nix");
59 CHECK (f.parent_path() == temp);
62 fs::permissions(f, fs::perms::owner_read | fs::perms::group_all | fs::perms::others_exec);
85 CHECK (not out.good());
86 CHECK (0 == fs::file_size(f));
98 fs::path sweetHome{
"~"};
99 CHECK (
"~" == sweetHome.generic_string());
100 CHECK (not sweetHome.empty());
101 CHECK (not sweetHome.has_parent_path());
102 CHECK (not sweetHome.is_absolute());
107 CHECK (not sweetHome.empty());
108 CHECK ( sweetHome.has_parent_path());
109 CHECK ( sweetHome.is_absolute());
110 CHECK (fs::is_directory(sweetHome));
115 CHECK (itFollows.filename() ==
"follows");
116 CHECK (itFollows.is_absolute());
118 CHECK (fs::relative (itFollows, sweetHome) ==
"it/follows");
void simplifiedPermissionAccess()
void homedirectoryExpansion()
A RAII style temporary directory.
fs::path makeFile(string name="")
Includes the C++ Filesystem library and provides some convenience helpers.
Implementation namespace for support and library code.
bool can_exec(fs::path const &p)
bool can_write(fs::path const &p)
bool has_perm(fs::path const &p, fs::perms permissionMask)
check if the denoted path p has at least the given permissions
fs::path consolidated(fs::path rawPath)
resolves symlinks, ~ (Unix home dir) and relative specs
bool can_read(fs::path const &p)
check if the owner has read permissions on the denoted file or directory
Test runner and basic definitions for tests.
bool startsWith(string const &str, string const &prefix)
check if string starts with a given prefix
bool endsWith(string const &str, string const &suffix)
check if string ends with the given suffix
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Manage a temporary directory for storage, with automated clean-up.
A collection of frequently used helper functions to support unit testing.