Skip to content

Commit f6dd3f4

Browse files
committed
Verify that bare .java 'scripts' find all dependencies
... even when run via surefire... To that end, we piggy-back on the already existing test for bare .java "scripts": as scijava-common is a dependency of scripting-java, let's just use one of scijava-common's utility classes in the bare .java "script". That way, the test will only pass when scijava-common's class is found on the compiler class path. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent def5f24 commit f6dd3f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/org/scijava/plugins/scripting/java/JavaEngineTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ public void minimalProjectFromSource() throws Exception {
139139
public void testEvalReader() throws Exception {
140140
final String source = "" + //
141141
"package pinky.brain;\n" + //
142+
"import org.scijava.util.AppUtils;\n" + //
142143
"public class TakeOverTheWorld {\n" + //
143144
"\tpublic static void main(final String[] arguments) {\n" + //
145+
"\t\tSystem.err.println(\"main class: \" + AppUtils.getMainClass());\n" + //
144146
"\t\tthrow new RuntimeException(\"Egads!\");\n" + //
145147
"\t}\n" + //
146148
"}";

0 commit comments

Comments
 (0)