Skip to content

Commit

Permalink
ci: fix warnings running tests on windows
Browse files Browse the repository at this point in the history
fixes

WARN typos_lsp::lsp: check_text: Cannot convert uri file:///diagnostics.txt to file path
WARN typos_lsp::lsp: Using default policy because no route found for /diagnostics.txt
  • Loading branch information
tekumara committed Feb 4, 2024
1 parent 79ae446 commit 15e070b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/typos-lsp/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async fn test_code_action() {
"method": "textDocument/codeAction",
"params": {
"textDocument": {
"uri": "file:///diagnostics.txt"
"uri": "file:///c%3A/diagnostics.txt"
},
"range": range(1, 0, 2),
"context": {
Expand All @@ -64,7 +64,7 @@ async fn test_code_action() {
"method": "textDocument/codeAction",
"params": {
"textDocument": {
"uri": "file:///diagnostics.txt"
"uri": "file:///c%3A/diagnostics.txt"
},
"range": range(0, 11, 21),
"context": {
Expand Down Expand Up @@ -99,7 +99,7 @@ async fn test_code_action() {
"diagnostics": [ diag("`fo` should be `of`, `for`", 1, 0, 2) ],
"edit": {
"changes": {
"file:///diagnostics.txt": [
"file:///c%3A/diagnostics.txt": [
{
"newText": "of",
"range": range(1, 0, 2)
Expand All @@ -114,7 +114,7 @@ async fn test_code_action() {
"diagnostics": [ diag("`fo` should be `of`, `for`", 1, 0, 2) ],
"edit": {
"changes": {
"file:///diagnostics.txt": [
"file:///c%3A/diagnostics.txt": [
{
"newText": "for",
"range": range(1, 0, 2)
Expand All @@ -141,7 +141,7 @@ async fn test_code_action() {
"diagnostics": [ diag("`apropriate` should be `appropriate`", 0, 11, 21) ],
"edit": {
"changes": {
"file:///diagnostics.txt": [
"file:///c%3A/diagnostics.txt": [
{
"newText": "appropriate",
"range": range(0, 11, 21)
Expand Down Expand Up @@ -307,7 +307,7 @@ fn did_open_with(text: &str, uri: Option<&Url>) -> String {
"method": "textDocument/didOpen",
"params": {
"textDocument": {
"uri": uri.unwrap_or(&Url::parse("file:///diagnostics.txt").unwrap()),
"uri": uri.unwrap_or(&Url::parse("file:///c%3A/diagnostics.txt").unwrap()),
"languageId": "plaintext",
"version": 1,
"text": text
Expand Down Expand Up @@ -349,7 +349,7 @@ fn publish_diagnostics_with(diags: &[Value], uri: Option<&Url>) -> Value {
"jsonrpc": "2.0",
"method": "textDocument/publishDiagnostics",
"params": {
"uri": uri.unwrap_or(&Url::parse("file:///diagnostics.txt").unwrap()),
"uri": uri.unwrap_or(&Url::parse("file:///c%3A/diagnostics.txt").unwrap()),
"diagnostics": diags,
"version": 1
}
Expand Down

0 comments on commit 15e070b

Please sign in to comment.