package org.spoofax.jsglr2.integrationtest.languages;

import java.io.IOException;
import java.util.stream.Stream;

import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.TestFactory;
import org.spoofax.interpreter.terms.IStrategoTerm;
import org.spoofax.jsglr2.integrationtest.BaseTestWithParseTableFromTermWithJSGLR1;
import org.spoofax.terms.ParseError;

public class StrategoTest extends BaseTestWithParseTableFromTermWithJSGLR1 {

    public StrategoTest() throws Exception {
        setupParseTable("Stratego");
    }

    @TestFactory public Stream<DynamicTest> testAmbByExpectedAST() throws ParseError, IOException {
        String sampleProgram = getFileAsString("Stratego/ambiguity-issue.str");
        IStrategoTerm expectedAST = getFileAsAST("Stratego/ambiguity-issue.aterm");

        return testSuccessByAstString(sampleProgram, expectedAST.toString());
    }

    @TestFactory public Stream<DynamicTest> testIndentPadding() throws ParseError, IOException {
        String sampleProgram = getFileAsString("Stratego/test112.str");
        IStrategoTerm expectedAST = getFileAsAST("Stratego/test112.aterm");

        return testSuccessByAstString(sampleProgram, expectedAST.toString());
    }


}
@@ -109,16 +109,55 @@
 tream;%0A%0A
+import org.junit.jupiter.api.Disabled;%0A
 import o
@@ -915,32 +915,159 @@
 ring());%0A    %7D%0A%0A
+    @Disabled(%22The %7Bindentpadding%7D attribute is not supported by JSGLR2 imploding due to concerns around incremental parsing%22)%0A
     @TestFactory

Disable indentpadding test, note why