*/
package jalview.util;
+import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
import jalview.gui.JvOptionPane;
assertTrue(Platform.isControlDown(new MouseEvent(b, 0, 0L, mods, 0, 0,
0, 0, clickCount, isPopupTrigger, buttonNo), mac));
}
+
+ @Test(groups = "Functional")
+ public void testPathEquals()
+ {
+ assertTrue(Platform.pathEquals(null, null));
+ assertFalse(Platform.pathEquals(null, "apath"));
+ assertFalse(Platform.pathEquals("apath", null));
+ assertFalse(Platform.pathEquals("apath", "APATH"));
+ assertTrue(Platform.pathEquals("apath", "apath"));
+ assertTrue(Platform.pathEquals("apath/a/b", "apath\\a\\b"));
+ }
+
+ @Test(groups = "Functional")
+ public void testEscapeBackslashes()
+ {
+ assertNull(Platform.escapeBackslashes(null));
+ assertEquals(Platform.escapeBackslashes("hello world"), "hello world");
+ assertEquals(Platform.escapeBackslashes("hello\\world"), "hello\\\\world");
+ }
}