Skip to content

Commit a36ef43

Browse files
lemireanonrig
authored andcommitted
Verifying node issue 48254
1 parent b7b2c74 commit a36ef43

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/basic_tests.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,3 +316,17 @@ TEST(basic_tests, can_parse) {
316316
ASSERT_FALSE(ada::can_parse("!!!"));
317317
SUCCEED();
318318
}
319+
320+
TYPED_TEST(basic_tests, node_issue_48254) {
321+
auto base_url = ada::parse<TypeParam>("localhost:80");
322+
ASSERT_TRUE(base_url);
323+
ASSERT_EQ(base_url->get_hostname(), "");
324+
ASSERT_EQ(base_url->get_host(), "");
325+
ASSERT_EQ(base_url->get_pathname(), "80");
326+
ASSERT_EQ(base_url->get_href(), "localhost:80");
327+
ASSERT_EQ(base_url->get_origin(), "null");
328+
ASSERT_EQ(base_url->has_opaque_path, true);
329+
auto url = ada::parse<TypeParam>("", &*base_url);
330+
ASSERT_FALSE(url);
331+
SUCCEED();
332+
}

0 commit comments

Comments
 (0)