X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Futil%2FPlatformTest.java;h=2f583a54e5e8ba7b76e5a7b70521ec9471495b97;hb=4d5f77436c8d77a776ca7c042611f36238c97057;hp=28d0924b3b832a6b57153db55633feb38b09b808;hpb=df71d2a2ed64f36fc8fe396d6f4950f7b3519926;p=jalview.git diff --git a/test/jalview/util/PlatformTest.java b/test/jalview/util/PlatformTest.java index 28d0924..2f583a5 100644 --- a/test/jalview/util/PlatformTest.java +++ b/test/jalview/util/PlatformTest.java @@ -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,13 @@ 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"); + } }