Testing specific FoldingBuilder only


Is it possible to specify which FoldingBuilders should be available for a particular test?


E.g. in the tutorial Folding Test ( https://www.jetbrains.org/intellij/sdk/docs/tutorials/writing_tests_for_plugins/folding_test.html )

the testData contains <fold>s for both the simple language, as well as Java; but I don't see the point of testing Java folding builder as well; it is there as an undesired side-effect.

public class Test {
    public static void main(String[] args)<fold text=' { '> {
        </fold>System.out.println("<fold text='http://en.wikipedia.org/'>simple:website</fold>");<fold text=' }'>

When I have multiple FoldingBuilders, the tests can become even more cluttered. I was looking through the code of several plugins, and it seems that everyone just tests everything together.

The question is: is it possible to test FoldingBuilders independently, or is it recommended to have all of them enabled, even if in some cases you'll end up testing more than you want?

1 comment
Comment actions Permalink
Official comment

Unfortunately there is no way to suppress specific foldings in tests.

Please sign in to leave a comment.