Handle absolute paths on Windows (#1923)

Since the latest `package:test` rolled into the SDK, some DAP tests started failing to run tests with `dart test`. They use absolute paths on Windows: https://github.com/dart-lang/sdk/issues/51348

This updates the code to check if it looks like we are getting a path that starts with drive letter, and in that case prepend it with file:/// before parsing. I also made the logic for stripping out a leading / more robust (only do it if it really looks like a drive letter path).

@jakemac53 
6 files changed
tree: 794809078fea3b926c8ef6db265e239c1e32186f
  1. .github/
  2. integration_tests/
  3. legacy_tests/
  4. pkgs/
  5. tool/
  6. .gitattributes
  7. .gitignore
  8. analysis_options.yaml
  9. CONTRIBUTING.md
  10. mono_repo.yaml
  11. README.md
README.md

Dart CI OpenSSF Scorecard

What's here?

Welcome! package:test is the standard testing library for Dart and Flutter. If you have questions about Dart testing, please see the docs for package:test. package:test_api and package:test_core are implementation details and generally not user-facing.

package:checks is a relatively new library for expressing test expectations. It's a more modern version of package:matcher and features a literate API.

Packages

PackageDescriptionVersion
checksA framework for checking values against expectations and building custom expectations.pub package
testA full featured library for writing and running Dart tests across platforms.pub package
test_apipub package
test_corepub package