mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +00:00
Tests: Add tests for LexicalPath dirname handling
This commit is contained in:
parent
0aaa992c1c
commit
e87a9a7f9f
Notes:
sideshowbarker
2024-07-18 17:18:34 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/e87a9a7f9f0 Pull-request: https://github.com/SerenityOS/serenity/pull/7501
|
@ -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…
Reference in a new issue