mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
Tests: Add tests for LexicalPath dirname handling
This commit is contained in:
parent
0aaa992c1c
commit
e87a9a7f9f
1 changed files with 8 additions and 0 deletions
|
@ -78,3 +78,11 @@ TEST_CASE(relative_path)
|
|||
EXPECT_EQ(LexicalPath::relative_path("/tmp/foo.txt", "tmp"), String {});
|
||||
EXPECT_EQ(LexicalPath::relative_path("tmp/foo.txt", "/tmp"), String {});
|
||||
}
|
||||
|
||||
TEST_CASE(dirname)
|
||||
{
|
||||
EXPECT_EQ(LexicalPath(".").dirname(), ".");
|
||||
EXPECT_EQ(LexicalPath("/").dirname(), "/");
|
||||
EXPECT_EQ(LexicalPath("abc.txt").dirname(), ".");
|
||||
EXPECT_EQ(LexicalPath("/abc.txt").dirname(), "/");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue