Skip to content

Commit c353cdc

Browse files
committed
add defoverridable test for keywords
1 parent 37f8f93 commit c353cdc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

spec/syntax/keyword_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,19 @@
2828
assert length(captured) > 0
2929
EOF
3030
end
31+
32+
it 'defoverridable' do
33+
expect(<<~EOF).to include_elixir_syntax('elixirKeyword', 'init:')
34+
defmodule Test do
35+
defmacro __using__(_options) do
36+
quote do
37+
def init(args) do
38+
{:ok, args}
39+
end
40+
defoverridable init: 1
41+
end
42+
end
43+
end
44+
EOF
45+
end
3146
end

0 commit comments

Comments
 (0)