JAL-3244 renamed Platform method for clarity
[jalview.git] / test / jalview / util / PlatformTest.java
index 28d0924..d2c48f1 100644 (file)
@@ -20,7 +20,9 @@
  */
 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;
@@ -131,4 +133,12 @@ public class PlatformTest
     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");
+  }
 }