-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Formatting is broken when using simple {}
Fixes #1345 Signed-off-by: azerr <[email protected]>
- Loading branch information
1 parent
7641f57
commit b945502
Showing
8 changed files
with
256 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/test/java/com/redhat/devtools/intellij/qute/lang/psi/QuteParsingTestCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.redhat.devtools.intellij.qute.lang.psi; | ||
|
||
import com.intellij.lang.ParserDefinition; | ||
import com.intellij.mock.MockSmartPointerManager; | ||
import com.intellij.openapi.application.ex.PathManagerEx; | ||
import com.intellij.psi.SmartPointerManager; | ||
import com.intellij.testFramework.ParsingTestCase; | ||
import com.redhat.devtools.intellij.qute.lang.QuteParserDefinition; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
public class QuteParsingTestCase extends ParsingTestCase { | ||
|
||
public QuteParsingTestCase() { | ||
super("psi", "qute", new QuteParserDefinition()); | ||
} | ||
|
||
@Override | ||
protected void setUp() throws Exception { | ||
super.setUp(); | ||
project.registerService(SmartPointerManager.class, new MockSmartPointerManager()); | ||
} | ||
|
||
@Override | ||
protected String getTestDataPath() { | ||
return new File("testData/qute").getPath(); | ||
} | ||
|
||
public void testHelloWorld() throws IOException { doCodeTest("<h1>Hello {http:param('name', 'Quarkus')}!</h1> "); } | ||
|
||
public void testSimpleText() throws IOException { doCodeTest("foo"); } | ||
|
||
public void testSectionWithHtml() throws IOException { | ||
doCodeTest(""" | ||
<div> | ||
<div> | ||
{#if} | ||
{#if} | ||
{inject:flash.get("key")} | ||
<form> | ||
</form> | ||
{/if} | ||
{/if} | ||
</div> | ||
</div> | ||
"""); | ||
} | ||
} |
Oops, something went wrong.