Skip to content

Commit 9660049

Browse files
committed
Make ScriptServiceTest less platform-dependent
This lets the test pass on Windows, too. You know, that operating system that is a little different than everything else. Just a little. Just enough to need special attention. Almost every single time. Thanks, Junien Jenkins. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 55b7932 commit 9660049

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/org/scijava/script/ScriptServiceTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ public class ScriptServiceTest {
5454
public void testSystemProperty() {
5555
final String slash = File.separator;
5656
final String sep = File.pathSeparator;
57-
final String dir1 = slash + "foo" + slash + "bar";
58-
final String dir2 = slash + "to" + slash + "the" + slash + "moon";
57+
final String root = new File(slash).getAbsolutePath();
58+
final String dir1 = root + "foo" + slash + "bar";
59+
final String dir2 = root + "to" + slash + "the" + slash + "moon";
5960
System.setProperty("scijava.scripts.path", dir1 + sep + dir2);
6061

6162
final Context context = new Context(ScriptService.class);

0 commit comments

Comments
 (0)