-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add tests covering more cases for Uri.resolve #62073
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
Conversation
Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at:
https://dart-review.googlesource.com/c/sdk/+/464040
Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly.
Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR).
lrhn
commented
Nov 25, 2025
ACK. The more supported cases are resolution against a base that is not a full URI, just a URI reference.
Some choices were made to support those, like allowing a resolution against a relative path to end up with leading ../.
stof
commented
Nov 25, 2025
Note that I'm not doing any choice there. Those are tests covering the existing behavior of the implementation.
As part of the scssphp project (which is a PHP port of dart-sass), I had to implement the
Uri.resolveAPI of Dart in PHP (as this API does not implement only the RFC3986 resolution but more cases). My initial work used a testsuite ported from the Dart SDK tests but collecting code coverage on my PHP code revealed that those tests were far from covering all non-RFC3986 cases. It missed several cases:This is adding tests covering all those cases.
Contribution guidelines:
dart format.Note that this repository uses Gerrit for code reviews. Your pull request will be automatically converted into a Gerrit CL and a link to the CL written into this PR. The review will happen on Gerrit but you can also push additional commits to this PR to update the code review.