Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path setter bug #659

Merged
merged 2 commits into from
May 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/basic_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,14 @@ TYPED_TEST(basic_tests, nodejs_undici_2971) {
out->get_href(),
R"(https://non-ascii-location-header.sys.workers.dev/%EC%95%88%EB%85%95)");
SUCCEED();
}

TYPED_TEST(basic_tests, path_setter_bug) {
std::string_view base = "blob:/?";
auto base_url = ada::parse<ada::url_aggregator>(base);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto base_url = ada::parse<ada::url_aggregator>(base);
auto base_url = ada::parse<TypeParam>(base);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't do that as is. It will break the build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. Then maybe we shouldn't use typed_test

ASSERT_TRUE(base_url);
ASSERT_TRUE(base_url->validate());
ASSERT_TRUE(base_url->set_pathname("//.."));
ASSERT_TRUE(base_url->validate());
SUCCEED();
}
Loading