From 760c719b97b4a9fe820c3e008cf05c30d14905a5 Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Sun, 16 Jul 2023 02:45:00 +0000 Subject: [PATCH] [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 Reviewed-by: Konstantin Shcheglov --- pkg/analysis_server/test/lsp/server_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/analysis_server/test/lsp/server_test.dart b/pkg/analysis_server/test/lsp/server_test.dart index 87a194021d5d..2af20cfacb07 100644 --- a/pkg/analysis_server/test/lsp/server_test.dart +++ b/pkg/analysis_server/test/lsp/server_test.dart @@ -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),