Skip to content

Commit 097ac60

Browse files
committed
test: fix test in 1.18+
1 parent 1e2ff22 commit 097ac60

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.tool-versions

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
elixir 1.17.3-otp-27
2-
erlang 27.1.2
1+
elixir 1.18.2-otp-27
2+
erlang 27.2.1

test/mneme/diff/ast_test.exs

+13-5
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,19 @@ defmodule Mneme.Diff.ASTTest do
192192
auto_assert {:%{}, [closing: [line: 1, column: 3], line: 1, column: _], []} <-
193193
parse_string!("%{}")
194194

195-
auto_assert {:%{}, [closing: [line: 1, column: 12], line: 1, column: _],
196-
[
197-
{{:atom, [line: 1, column: 3], :foo},
198-
{:int, [token: "1", line: 1, column: 11], 1}}
199-
]} <- parse_string!("%{:foo => 1}")
195+
if Version.match?(System.version(), "~> 1.18.2") do
196+
auto_assert {:%{}, [closing: [line: 1, column: 12], line: 1, column: 1],
197+
[
198+
{{:atom, [assoc: [line: 1, column: 8], line: 1, column: 3], :foo},
199+
{:int, [token: "1", line: 1, column: 11], 1}}
200+
]} <- parse_string!("%{:foo => 1}")
201+
else
202+
auto_assert {:%{}, [closing: [line: 1, column: 12], line: 1, column: _],
203+
[
204+
{{:atom, [line: 1, column: 3], :foo},
205+
{:int, [token: "1", line: 1, column: 11], 1}}
206+
]} <- parse_string!("%{:foo => 1}")
207+
end
200208

201209
auto_assert {:%{}, [closing: [line: 1, column: 9], line: 1, column: _],
202210
[

0 commit comments

Comments
 (0)