mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
makeParentCanonical: test case where parent is empty
(cherry picked from commit 5a5a86949a
)
This commit is contained in:
parent
7c4e2fdfd7
commit
b0784dd69b
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