1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

added test for url corner case

This commit is contained in:
Falk Werner 2020-07-02 19:14:38 +02:00
parent 24f12c147e
commit 75e8aea92b

View File

@ -90,3 +90,12 @@ TEST(url, FailToParseMissingPath)
ASSERT_EQ(nullptr, url.host);
}
TEST(url, FailToParseWithPortMissingPath)
{
struct wf_url url;
bool result = wf_impl_url_init(&url, "ws://localhost:54321");
ASSERT_FALSE(result);
ASSERT_EQ(0, url.port);
ASSERT_EQ(nullptr, url.path);
ASSERT_EQ(nullptr, url.host);
}