Skip to content

Commit

Permalink
green up some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed May 27, 2022
1 parent 381ca6e commit c8ee1f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 55 deletions.
18 changes: 10 additions & 8 deletions src/FsAutoComplete.Core/SymbolLocation.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ let getDeclarationLocation

match declarationLocation with
| Some loc ->
let filePath =
Path.FilePathToUri(Path.GetFullPathSafe loc.FileName)
|> Path.FileUriToLocalPath
let isScript = isAScript loc.FileName
// sometimes the source file locations start with a capital, despite all of our efforts.
let normalizedPath =
if System.Char.IsUpper(loc.FileName[0]) then
string (System.Char.ToLowerInvariant loc.FileName[0])
+ (loc.FileName.Substring(1))
else
loc.FileName

let isScript = isAScript filePath
let taggedFilePath = UMX.tag filePath
let normalizedFilePath = Path.GetFullPathSafe filePath
let taggedFilePath = UMX.tag normalizedPath

if isScript
&& taggedFilePath = currentDocument.FileName then
Expand All @@ -49,8 +52,7 @@ let getDeclarationLocation
let projectsThatContainFile =
state.ProjectController.ProjectOptions
|> Seq.choose (fun (_, p) ->
if p.SourceFiles |> Array.contains normalizedFilePath //
then
if p.SourceFiles |> Array.contains normalizedPath then
Some p
else
None)
Expand Down
47 changes: 0 additions & 47 deletions test/FsAutoComplete.Tests.Lsp/decode.fsx

This file was deleted.

0 comments on commit c8ee1f4

Please sign in to comment.