mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
AK: Make sure URL retains trailing slash if present in complete_url
This commit is contained in:
parent
013cb76d77
commit
b5b08fba92
2 changed files with 17 additions and 1 deletions
|
@ -157,4 +157,12 @@ TEST_CASE(about_url)
|
|||
EXPECT_EQ(url.to_string(), "about:blank");
|
||||
}
|
||||
|
||||
TEST_CASE(trailing_slash_with_complete_url)
|
||||
{
|
||||
EXPECT_EQ(URL("http://a/b/").complete_url("c/").to_string(), "http://a/b/c/");
|
||||
EXPECT_EQ(URL("http://a/b/").complete_url("c").to_string(), "http://a/b/c");
|
||||
EXPECT_EQ(URL("http://a/b").complete_url("c/").to_string(), "http://a/c/");
|
||||
EXPECT_EQ(URL("http://a/b").complete_url("c").to_string(), "http://a/c");
|
||||
}
|
||||
|
||||
TEST_MAIN(URL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue