From: hansonr Date: Wed, 28 Aug 2019 04:52:24 +0000 (-0500) Subject: JAL-3253-applet JAL-3423 Windows TestNG X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=89783fd8b12b50270d561017d5481de089d86d70 JAL-3253-applet JAL-3423 Windows TestNG mac CTRL test is only for Macs. --- diff --git a/test/jalview/gui/PairwiseAlignmentPanelTest.java b/test/jalview/gui/PairwiseAlignmentPanelTest.java index 3322ee8..e74849f 100644 --- a/test/jalview/gui/PairwiseAlignmentPanelTest.java +++ b/test/jalview/gui/PairwiseAlignmentPanelTest.java @@ -9,10 +9,10 @@ import jalview.io.FileLoader; import javax.swing.JTextArea; -import junit.extensions.PA; - import org.testng.annotations.Test; +import junit.extensions.PA; + public class PairwiseAlignmentPanelTest { @Test(groups = "Functional") @@ -37,7 +37,8 @@ public class PairwiseAlignmentPanelTest PairwiseAlignPanel testee = new PairwiseAlignPanel(viewport); - String text = ((JTextArea) PA.getValue(testee, "textarea")).getText(); + String text = ((JTextArea) PA.getValue(testee, "textarea")).getText() + .replaceAll("\r", ""); String expected = "Score = 80.0\n" + "Length of alignment = 4\n" + "Sequence FER1_PEA/29-32 (Sequence length = 7)\n" + "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)\n\n" @@ -62,7 +63,8 @@ public class PairwiseAlignmentPanelTest PairwiseAlignPanel testee = new PairwiseAlignPanel(viewport); - String text = ((JTextArea) PA.getValue(testee, "textarea")).getText(); + String text = ((JTextArea) PA.getValue(testee, "textarea")).getText() + .replaceAll("\r", ""); String expected = "Score = 80.0\n" + "Length of alignment = 4\n" + "Sequence FER1_PEA/29-32 (Sequence length = 7)\n" + "Sequence Q93XJ9_SOLTU/23-26 (Sequence length = 7)\n\n" diff --git a/test/jalview/util/PlatformTest.java b/test/jalview/util/PlatformTest.java index 5052894..c8616ad 100644 --- a/test/jalview/util/PlatformTest.java +++ b/test/jalview/util/PlatformTest.java @@ -53,11 +53,16 @@ public class PlatformTest public void testIsControlDown_mac() { String toolkit = Toolkit.getDefaultToolkit().getClass().getName(); - if ("sun.awt.X11.XToolkit".equals(toolkit)) + if (toolkit.endsWith("XToolkit") || toolkit.endsWith("WToolkit")) { /* * this toolkit on the build server fails these tests, * because it returns 2, not 4, for getMenuShortcutKeyMask + * + * Same for windows, because the Platform test "mac" must match the + * actual platform that is running the test. + * + * */ return; }