mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
[site] Folding test
This commit is contained in:
parent
db01f73dcd
commit
8418f5f24a
@ -70,7 +70,7 @@
|
||||
* [Annotator Test](annotator_test.html)
|
||||
* [Formatter Test](formatter_test.html)
|
||||
* [Rename Test](rename_test.html)
|
||||
* [Folding Test](TODO)
|
||||
* [Folding Test](folding_test.html)
|
||||
* [Find Usages Test](TODO)
|
||||
* [Commenter Test](TODO)
|
||||
* [Reference Test](TODO)
|
||||
|
44
folding_test.md
Normal file
44
folding_test.md
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Folding Test
|
||||
---
|
||||
|
||||
<!--
|
||||
INITIAL_SOURCE https://confluence.jetbrains.com/display/IntelliJIDEA/Folding+Test
|
||||
-->
|
||||
|
||||
# {{ page.title }}
|
||||
|
||||
In this test we will check if the folding builder, implemented in the
|
||||
[Folding Builder](folding_builder.html)
|
||||
section of the
|
||||
[Custom Language Support Tutorial](cls_tutorial.html),
|
||||
works as we expect.
|
||||
|
||||
### 1. Define test data
|
||||
|
||||
Create a file *FoldingTestData.java*.
|
||||
|
||||
```java
|
||||
public class Test {
|
||||
public static void main(String[] args) <fold text='{...}'>{
|
||||
System.out.println("<fold text='http://en.wikipedia.org/'>simple:website</fold>");
|
||||
}</fold>
|
||||
}
|
||||
```
|
||||
|
||||
### 2. Define a test
|
||||
|
||||
```java
|
||||
public void testFolding() {
|
||||
myFixture.configureByFiles("DefaultTestData.simple");
|
||||
myFixture.testFolding(getTestDataPath() + "/FoldingTestData.java");
|
||||
}
|
||||
```
|
||||
|
||||
### 3. Run the test
|
||||
|
||||
Run the test and make sure it's green.
|
||||
|
||||
-----
|
||||
|
||||
[Previous](rename_test.html) [Top](writing_tests_for_plugins.html) [Next](find_usages_test.html)
|
@ -20,7 +20,7 @@ and cover its code with functional tests.
|
||||
* [Annotator Test](annotator_test.html)
|
||||
* [Formatter Test](formatter_test.html)
|
||||
* [Rename Test](rename_test.html)
|
||||
* [Folding Test](TODO)
|
||||
* [Folding Test](folding_test.html)
|
||||
* [Find Usages Test](TODO)
|
||||
* [Commenter Test](TODO)
|
||||
* [Reference Test](TODO)
|
||||
|
Loading…
x
Reference in New Issue
Block a user