17f4198cfe
Some artifacts are .exe instead of .bat. Library uris with file schemes use the Uri.path (using forward slashes on Windows), so the tests emitting native asset mappings should use Uri.path as well. (Not Uri.toFilePath() which uses backwards slashes.) The paths of the dynamic libraries in the assets should use the toFilePath(), as these are passed to the system API which expects correct paths. The Platform.script Uri has a path with file:///C: and back slashes. The uri RFC does not support back slashes, and our ResolveUri does neither. So for Windows we replace backslashes with forward slashes. TEST=tests/ffi/native_assets/ Bug: https://github.com/dart-lang/sdk/issues/51066 Bug: https://github.com/dart-lang/sdk/issues/51067 Change-Id: I2e168e0549fe80d9a5366d636c6f1ef971942130 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-win-release-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-nnbd-win-release-ia32-try,vm-kernel-msvc-windows-try,dart-sdk-win-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279356 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>