@@ -0,0 +1,1584 @@
+import static org.junit.jupiter.api.Assertions.assertEquals;%0A%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.util.concurrent.TimeUnit;%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.jupiter.api.io.TempDir;%0A%0Aclass SanityTests %7B%0A  @Test%0A  void openAndRunBachJavaInJShellReturnsZero(@TempDir Path temp) throws Exception %7B%0A    var builder = new ProcessBuilder(%22jshell%22);%0A    builder.command().add(%22--execution=local%22);%0A    builder.command().add(%22-%22); // Standard input, without interactive I/O.%0A    var err = temp.resolve(%22err.txt%22);%0A    var out = temp.resolve(%22out.txt%22);%0A    var process = builder.redirectError(err.toFile()).redirectOutput(out.toFile()).start();%0A    process.getOutputStream().write(%22/open src/bach/Bach.java%5Cn%22.getBytes());%0A    process.getOutputStream().write(%22var bach = new Bach()%5Cn%22.getBytes());%0A    process.getOutputStream().write(%22/exit%5Cn%22.getBytes());%0A    process.getOutputStream().flush();%0A    if (!process.waitFor(23, TimeUnit.SECONDS)) %7B%0A      process.destroy();%0A    %7D%0A    var code = process.exitValue();%0A    assertEquals(0, code, Files.readString(err));%0A    assertEquals(0, Files.size(out), Files.readString(out));%0A    assertEquals(0, Files.size(err), Files.readString(err));%0A  %7D%0A%0A  @Test%0A  void compileAndRunBachJavaWithJavaReturnsZero() throws Exception %7B%0A    var builder = new ProcessBuilder(%22java%22);%0A    builder.command().add(%22-ea%22);%0A    builder.command().add(%22src/bach/Bach.java%22);%0A    var process = builder.start();%0A    process.waitFor(23, TimeUnit.SECONDS);%0A    var code = process.exitValue();%0A    assertEquals(0, code);%0A  %7D%0A%7D%0A

Add SanityTests ensuring Bach.java runs with JShell and JEP 330