Skip to content

Commit

Permalink
Finish local projection tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ashton314 committed Jul 30, 2024
1 parent b554451 commit ab07bed
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/chorex_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,19 @@ defmodule ChorexTest do
Chorex.project_local_expr(stx, __ENV__, Alice, Chorex.empty_ctx())
end

test "deeply nested pattern"
test "deeply nested pattern" do
stx =
quote do
Alice.({foo, {bar, baz, [zoop]}})
end

foo_var = render_var(:foo)
bar_var = render_var(:bar)
baz_var = render_var(:baz)
zoop_var = render_var(:zoop)

assert {{^foo_var, {:{}, [], [^bar_var, ^baz_var, [^zoop_var]]}}, [], []} =
Chorex.project_local_expr(stx, __ENV__, Alice, Chorex.empty_ctx())
end
end
end

0 comments on commit ab07bed

Please sign in to comment.