From a3d82d30b2bc55f250bbf1c94975308407e8aae7 Mon Sep 17 00:00:00 2001 From: hansonr Date: Tue, 27 Aug 2019 23:46:52 -0500 Subject: [PATCH] JAL-3253-applet JAL-3423 Windows TestNG CommandLineOperations indicates absolute file path; adding output file option to JavaScript --- src/jalview/bin/Jalview.java | 10 ++++++---- test/jalview/bin/CommandLineOperations.java | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index b149911..f59c37f 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -858,12 +858,12 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi + "] executed successfully!"); groovyscript = null; } - while (aparser.getSize() > 0) - { - System.out.println("Unknown arg: " + aparser.nextValue()); - } } checkOutputFile(aparser, af, format); + while (aparser.getSize() > 0) + { + System.out.println("Unknown arg: " + aparser.nextValue()); + } } } AlignFrame startUpAlframe = null; @@ -1052,6 +1052,8 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi // biojsmsa filename String outputFormat = aparser.nextValue(); String file = aparser.nextValue(); + System.out.println("format " + outputFormat); + if (outputFormat.equalsIgnoreCase("png")) { af.createPNG(new File(file)); diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index eaa395e..564e57d 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -251,9 +251,11 @@ public class CommandLineOperations String fileName, boolean withAWT, int expectedMinFileSize, int timeout) { - String cmd = harg + type + " " + fileName; - System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd); File file = new File(fileName); + String cmd = harg + type + " " + + file.getAbsolutePath().replace('\\', '/'); + System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd); + file.deleteOnExit(); Worker worker = getJalviewDesktopRunner(withAWT, cmd, timeout); assertNotNull(worker, "worker is null"); -- 1.7.10.2