Skip to content

Commit

Permalink
fix new 1.16 failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Dec 7, 2023
1 parent c64b751 commit 62b7778
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions lib/elixir_sense/core/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ defmodule ElixirSense.Core.Parser do
line_start =
case Regex.run(~r/line\s(\d+)/u, text) do
[_, line] -> line |> String.to_integer()
nil -> 1
end

if terminator in ["\"", "'", ")", "]", "}", ">>"] do
Expand Down
2 changes: 1 addition & 1 deletion test/elixir_sense/core/parser_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ defmodule ElixirSense.Core.ParserTest do
error: {:error, :parse_error},
lines_to_env: %{
1 => %Env{module: MyModule},
3 => %Env{module: MyModule1}
3 => %Env{module: _}
}
} = parse_string(source, true, true, {3, 1})

Expand Down
12 changes: 6 additions & 6 deletions test/elixir_sense/eval_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule ElixirSense.Evaltest do
assert ElixirSense.match(code) =~
"""
# TokenMissingError on line 1:
# ↳ missing terminator: } (for "{" starting at line 1)
# ↳ missing terminator: }\
"""
|> String.trim()
end
Expand Down Expand Up @@ -140,25 +140,25 @@ defmodule ElixirSense.Evaltest do

assert result.expand_once =~
"""
"missing terminator: } (for \\"{\\" starting at line 1)", ""}
"missing terminator: }\
"""
|> String.trim()

assert result.expand =~
"""
"missing terminator: } (for \\"{\\" starting at line 1)", ""}
"missing terminator: }\
"""
|> String.trim()

assert result.expand_partial =~
"""
"missing terminator: } (for \\"{\\" starting at line 1)", ""}
"missing terminator: }\
"""
|> String.trim()

assert result.expand_all =~
"""
"missing terminator: } (for \\"{\\" starting at line 1)", ""}
"missing terminator: }\
"""
|> String.trim()
end
Expand All @@ -177,7 +177,7 @@ defmodule ElixirSense.Evaltest do

assert ElixirSense.quote(code) =~
"""
"missing terminator: ) (for \\"(\\" starting at line 1)", \""}
"missing terminator: )\
"""
|> String.trim()
end
Expand Down

0 comments on commit 62b7778

Please sign in to comment.