package syntax;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import org.extendj.JavaChecker;
import org.extendj.parser.JavaParser;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.*;


public abstract class SyntaxTestBase {
  private static final String DIR = "src/test/resources/syntax/";

  private static class Checker extends JavaChecker {
    private String runChecker(String file) throws IOException {
      run(new String[]{file});
      return program.structuredPrettyPrint();
    }
  }

  private static String slurp(String file) throws IOException {
    return new String(Files.readAllBytes(Paths.get(file)), UTF_8);
  }

  protected void checkSyntax(String name) {
    String actual, expected;
    try {
      actual   = new Checker().runChecker(DIR + name + ".java");
      expected = slurp(DIR + name + ".expected");
    }
    catch (IOException e) {
      throw new RuntimeException(e);
    }
    assertEquals(expected.trim(), actual.trim());
  }
}

@@ -501,16 +501,52 @@
 tring%5B%5D%7B
+%22-classpath%22, %22build/classes/main%22, 
 file%7D);%0A

Add proper classpath to syntax tests