mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-18 09:43:04 +00:00
test(elixir): keep quoted definitions out of local symbols
This commit is contained in:
parent
67df07ab7a
commit
b8a235a4c1
1 changed files with 15 additions and 0 deletions
|
|
@ -86,6 +86,21 @@ end`;
|
|||
expect(bindings).toMatchObject({ One: 'Prefix.One', Two: 'Prefix.Two' });
|
||||
});
|
||||
|
||||
it('does not turn quoted definitions into local declarations', async () => {
|
||||
await loadLanguage(SupportedLanguages.Elixir, 'quoted.ex');
|
||||
const parsed = extractParsedFile(
|
||||
elixirProvider,
|
||||
`defmodule M do
|
||||
def real, do: :ok
|
||||
quote do
|
||||
def generated(value), do: value
|
||||
end
|
||||
end`,
|
||||
'quoted.ex',
|
||||
);
|
||||
expect(parsed?.localDefs.map((def) => def.qualifiedName).sort()).toEqual(['M', 'M.real']);
|
||||
});
|
||||
|
||||
it('captures aliases, constrained imports, pipelines, captures, delegates, and macro identity', async () => {
|
||||
await loadLanguage(SupportedLanguages.Elixir, 'lib/nonconventional_name.ex');
|
||||
const parsed = extractParsedFile(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue