[analysis_server] Fix missing-drive-letter test on Windows

My previous CL changed too much... This test specifically didn't want a valid absolute path on Windows, it wanted one without the drive letter.

Change-Id: If0812517e506f9960bca7ac99dd713be087b9ad9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314020
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Danny Tuppeny 2023-07-16 02:45:00 +00:00 committed by Commit Queue
parent 24f9c7c961
commit 760c719b97

View file

@ -203,7 +203,9 @@ class ServerTest extends AbstractLspAnalysisServerTest {
if (pathContext.style != package_path.Style.windows) {
return;
}
final missingDriveLetterFileUri = pathContext.toUri('/foo/bar.dart');
// This code deliberately does not use pathContext because we're testing a
// without a drive letter, but pathContext.toUri() would include one.
final missingDriveLetterFileUri = Uri.parse('file:///foo/bar.dart');
await initialize();
await expectLater(
getHover(missingDriveLetterFileUri, startOfDocPos),