mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
makeParentCanonical: test case where parent is empty
This commit is contained in:
parent
628c11d237
commit
5a5a86949a
1 changed files with 14 additions and 0 deletions
|
@ -261,4 +261,18 @@ TEST(pathExists, bogusPathDoesNotExist)
|
|||
{
|
||||
ASSERT_FALSE(pathExists("/schnitzel/darmstadt/pommes"));
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* makeParentCanonical
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
TEST(makeParentCanonical, noParent)
|
||||
{
|
||||
ASSERT_EQ(makeParentCanonical("file"), absPath(std::filesystem::path("file")));
|
||||
}
|
||||
|
||||
TEST(makeParentCanonical, root)
|
||||
{
|
||||
ASSERT_EQ(makeParentCanonical("/"), "/");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue