Skip to content

Commit

Permalink
Update test-suite
Browse files Browse the repository at this point in the history
  • Loading branch information
gordalina committed Feb 23, 2021
1 parent 5ba3aea commit 1a9a935
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
6 changes: 2 additions & 4 deletions tests/languages/elixir/attribute_feature.test
Expand Up @@ -8,12 +8,10 @@ foobar

[
["attribute", "@vsn"], ["number", "2"],
["attribute", "@moduledoc"], ["string", [
"\"\"\"\r\nfoobar\r\n\"\"\""
]],
["doc", "@moduledoc \"\"\"\r\nfoobar\r\n\"\"\""],
["attribute", "@tag"], ["atom", ":external"]
]

----------------------------------------------------

Checks for module attributes.
Checks for module attributes.
11 changes: 8 additions & 3 deletions tests/languages/elixir/capture_feature.test
Expand Up @@ -7,7 +7,10 @@ fun = &(&1 + 1)

[
"fun ", ["operator", "="],
["capture", "&Math.zero?/1"],
["operator", "&"],
["atom-module", "Math"],
["punctuation", "."],
["function-call", "zero?/1"],
["punctuation", "("],
["capture", "&is_function/1"],
["punctuation", ")"],
Expand All @@ -17,12 +20,14 @@ fun = &(&1 + 1)
["capture", "&"],
["punctuation", "("], ["argument", "&1"],
["operator", "+"], ["number", "1"], ["punctuation", ")"],
["capture", "&List.flatten"],
["operator", "&"],
["atom-module", "List"],
["punctuation", "."], ["function-call", "flatten"],
["punctuation", "("], ["argument", "&1"],
["punctuation", ","], ["argument", "&2"],
["punctuation", ")"]
]

----------------------------------------------------

Checks for function capturing and arguments.
Checks for function capturing and arguments.
6 changes: 3 additions & 3 deletions tests/languages/elixir/issue1392.test
Expand Up @@ -3,14 +3,14 @@ String.upcase(@fixed)
----------------------------------------------------

[
"String",
["atom-module", "String"],
["punctuation", "."],
"upcase",
["function-call", "upcase"],
["punctuation", "("],
["attribute", "@fixed"],
["punctuation", ")"]
]

----------------------------------------------------

Ensure module attributes don't consume punctuation.
Ensure module attributes don't consume punctuation.
7 changes: 2 additions & 5 deletions tests/languages/elixir/issue775.test
Expand Up @@ -5,13 +5,10 @@
----------------------------------------------------

[
["attribute", "@doc"],
["string", [
"\"\"\"\r\n## Parameters\r\n\"\"\""
]]
["doc", "@doc \"\"\"\r\n## Parameters\r\n\"\"\""]
]

----------------------------------------------------

Ensures that markdown headers are not highlighted as comments inside strings.
See #775 for details.
See #775 for details.
4 changes: 2 additions & 2 deletions tests/languages/elixir/keyword_feature.test
Expand Up @@ -9,7 +9,7 @@ defdelegate
defstruct do else
end fn for if
import not or
require rescue try
raise require rescue try
unless use when

----------------------------------------------------
Expand All @@ -26,7 +26,7 @@ unless use when
["keyword", "defstruct"], ["keyword", "do"], ["keyword", "else"],
["keyword", "end"], ["keyword", "fn"], ["keyword", "for"], ["keyword", "if"],
["keyword", "import"], ["keyword", "not"], ["keyword", "or"],
["keyword", "require"], ["keyword", "rescue"], ["keyword", "try"],
["keyword", "raise"], ["keyword", "require"], ["keyword", "rescue"], ["keyword", "try"],
["keyword", "unless"], ["keyword", "use"], ["keyword", "when"]
]

Expand Down
4 changes: 2 additions & 2 deletions tests/languages/elixir/module_feature.test
Expand Up @@ -7,10 +7,10 @@ end
----------------------------------------------------

[
["keyword", "defmodule"], ["module", "Math"], ["keyword", "do"],
["keyword", "defmodule"], ["atom-module", "Math"], ["keyword", "do"],

["keyword", "def"],
["function", "sum"],
["function-call", "sum"],
["punctuation", "("],
"a",
["punctuation", ","],
Expand Down

0 comments on commit 1a9a935

Please sign in to comment.