Skip to content

Commit

Permalink
Regression tests for #1105
Browse files Browse the repository at this point in the history
  • Loading branch information
KronicDeth committed Jun 2, 2018
1 parent ff0d1bf commit e26db52
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 0 deletions.
@@ -0,0 +1,4 @@
%{
:true => "true",
:false => "false"
}
@@ -0,0 +1,44 @@
Elixir File(0,43)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(0,43)
ElixirMapOperationImpl(MAP_OPERATION)(0,43)
ElixirMapPrefixOperatorImpl(MAP_PREFIX_OPERATOR)(0,1)
PsiElement(%)('%')(0,1)
ElixirMapArgumentsImpl(MAP_ARGUMENTS)(1,43)
PsiElement({)('{')(1,2)
PsiWhiteSpace('\n ')(2,5)
ElixirMapConstructionArgumentsImpl(MAP_CONSTRUCTION_ARGUMENTS)(5,41)
ElixirAssociationsImpl(ASSOCIATIONS)(5,41)
ElixirAssociationsBaseImpl(ASSOCIATIONS_BASE)(5,41)
ElixirContainerAssociationOperationImpl(CONTAINER_ASSOCIATION_OPERATION)(5,20)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(5,10)
ElixirAtomImpl(ATOM)(5,10)
PsiElement(:)(':')(5,6)
PsiElement(A-Z, a-z, _, @, 0-9. ?, !)('true')(6,10)
PsiWhiteSpace(' ')(10,11)
PsiElement(=>)('=>')(11,13)
PsiWhiteSpace(' ')(13,14)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(14,20)
ElixirStringLineImpl(STRING_LINE)(14,20)
PsiElement(String Promoter ("))('"')(14,15)
ElixirQuoteStringBodyImpl(QUOTE_STRING_BODY)(15,19)
PsiElement(String Fragment)('true')(15,19)
PsiElement(String Terminator ("))('"')(19,20)
PsiElement(,)(',')(20,21)
PsiElement(\\n, \\r\\n)('\n')(21,22)
PsiWhiteSpace(' ')(22,24)
ElixirContainerAssociationOperationImpl(CONTAINER_ASSOCIATION_OPERATION)(24,41)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(24,30)
ElixirAtomImpl(ATOM)(24,30)
PsiElement(:)(':')(24,25)
PsiElement(A-Z, a-z, _, @, 0-9. ?, !)('false')(25,30)
PsiWhiteSpace(' ')(30,31)
PsiElement(=>)('=>')(31,33)
PsiWhiteSpace(' ')(33,34)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(34,41)
ElixirStringLineImpl(STRING_LINE)(34,41)
PsiElement(String Promoter ("))('"')(34,35)
ElixirQuoteStringBodyImpl(QUOTE_STRING_BODY)(35,40)
PsiElement(String Fragment)('false')(35,40)
PsiElement(String Terminator ("))('"')(40,41)
PsiWhiteSpace('\n')(41,42)
PsiElement(})('}')(42,43)
@@ -0,0 +1,4 @@
%{
true => "true",
false => "false"
}
@@ -0,0 +1,42 @@
Elixir File(0,41)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(0,41)
ElixirMapOperationImpl(MAP_OPERATION)(0,41)
ElixirMapPrefixOperatorImpl(MAP_PREFIX_OPERATOR)(0,1)
PsiElement(%)('%')(0,1)
ElixirMapArgumentsImpl(MAP_ARGUMENTS)(1,41)
PsiElement({)('{')(1,2)
PsiWhiteSpace('\n ')(2,5)
ElixirMapConstructionArgumentsImpl(MAP_CONSTRUCTION_ARGUMENTS)(5,39)
ElixirAssociationsImpl(ASSOCIATIONS)(5,39)
ElixirAssociationsBaseImpl(ASSOCIATIONS_BASE)(5,39)
ElixirContainerAssociationOperationImpl(CONTAINER_ASSOCIATION_OPERATION)(5,19)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(5,9)
ElixirAtomKeywordImpl(ATOM_KEYWORD)(5,9)
PsiElement(true)('true')(5,9)
PsiWhiteSpace(' ')(9,10)
PsiElement(=>)('=>')(10,12)
PsiWhiteSpace(' ')(12,13)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(13,19)
ElixirStringLineImpl(STRING_LINE)(13,19)
PsiElement(String Promoter ("))('"')(13,14)
ElixirQuoteStringBodyImpl(QUOTE_STRING_BODY)(14,18)
PsiElement(String Fragment)('true')(14,18)
PsiElement(String Terminator ("))('"')(18,19)
PsiElement(,)(',')(19,20)
PsiElement(\\n, \\r\\n)('\n')(20,21)
PsiWhiteSpace(' ')(21,23)
ElixirContainerAssociationOperationImpl(CONTAINER_ASSOCIATION_OPERATION)(23,39)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(23,28)
ElixirAtomKeywordImpl(ATOM_KEYWORD)(23,28)
PsiElement(false)('false')(23,28)
PsiWhiteSpace(' ')(28,29)
PsiElement(=>)('=>')(29,31)
PsiWhiteSpace(' ')(31,32)
ElixirAccessExpressionImpl(ACCESS_EXPRESSION)(32,39)
ElixirStringLineImpl(STRING_LINE)(32,39)
PsiElement(String Promoter ("))('"')(32,33)
ElixirQuoteStringBodyImpl(QUOTE_STRING_BODY)(33,38)
PsiElement(String Fragment)('false')(33,38)
PsiElement(String Terminator ("))('"')(38,39)
PsiWhiteSpace('\n')(39,40)
PsiElement(})('}')(40,41)
@@ -0,0 +1,4 @@
%{
true: "true",
false: "false"
}
@@ -0,0 +1,23 @@
Elixir File(0,37)
PsiErrorElement:'%' unexpected(0,1)
PsiElement(%)('%')(0,1)
PsiElement(DUMMY_BLOCK)(1,27)
PsiElement({)('{')(1,2)
PsiWhiteSpace('\n ')(2,5)
PsiElement(true)('true')(5,9)
PsiElement(Keyword Pair Colon (:))(':')(9,10)
PsiWhiteSpace(' ')(10,11)
PsiElement(String Promoter ("))('"')(11,12)
PsiElement(String Fragment)('true')(12,16)
PsiElement(String Terminator ("))('"')(16,17)
PsiElement(,)(',')(17,18)
PsiElement(\\n, \\r\\n)('\n')(18,19)
PsiWhiteSpace(' ')(19,21)
PsiElement(false)('false')(21,26)
PsiElement(Keyword Pair Colon (:))(':')(26,27)
PsiWhiteSpace(' ')(27,28)
PsiElement(String Promoter ("))('"')(28,29)
PsiElement(String Fragment)('false')(29,34)
PsiElement(String Terminator ("))('"')(34,35)
PsiWhiteSpace('\n')(35,36)
PsiElement(})('}')(36,37)
19 changes: 19 additions & 0 deletions tests/org/elixir_lang/parser_definition/Issue1105.kt
@@ -0,0 +1,19 @@
package org.elixir_lang.parser_definition

class Issue1105 : ParsingTestCase() {
fun testAssociatedAtom() {
assertParsedAndQuotedCorrectly()
}

fun testAssociatedBoolean() {
assertParsedAndQuotedCorrectly()
}

fun testKeywordBoolean() {
assertParsedAndQuotedCorrectly()
}

override fun getTestDataPath(): String {
return super.getTestDataPath() + "/issue_1105"
}
}

0 comments on commit e26db52

Please sign in to comment.