brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@apache.org
Subject [2/5] git commit: Fix unit test for ampersand (non) escaping
Date Fri, 06 Jun 2014 19:15:18 GMT
Fix unit test for ampersand (non) escaping


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/cbb166cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/cbb166cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/cbb166cd

Branch: refs/heads/master
Commit: cbb166cd36eb3b75a715b0ee70157fb911531cd5
Parents: 14e6ed6
Author: Andrew Kennedy <andrew.kennedy@cloudsoftcorp.com>
Authored: Wed Jun 4 18:48:32 2014 +0100
Committer: Andrew Kennedy <andrew.kennedy@cloudsoftcorp.com>
Committed: Wed Jun 4 18:48:32 2014 +0100

----------------------------------------------------------------------
 .../src/test/java/brooklyn/util/text/StringEscapesTest.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/cbb166cd/utils/common/src/test/java/brooklyn/util/text/StringEscapesTest.java
----------------------------------------------------------------------
diff --git a/utils/common/src/test/java/brooklyn/util/text/StringEscapesTest.java b/utils/common/src/test/java/brooklyn/util/text/StringEscapesTest.java
index a45b829..6501f73 100644
--- a/utils/common/src/test/java/brooklyn/util/text/StringEscapesTest.java
+++ b/utils/common/src/test/java/brooklyn/util/text/StringEscapesTest.java
@@ -29,12 +29,11 @@ public class StringEscapesTest {
 		Assert.assertTrue(BashStringEscapes.isValidForDoubleQuotingInBash("\\\""));
 	}	
     
+    /** Bash handles ampersand in double quoted strings without escaping. */
     @Test
     public void testBashEscapableAmpersand() {
-        Assert.assertTrue(BashStringEscapes.isValidForDoubleQuotingInBash("\\&"));
-        Assert.assertFalse(BashStringEscapes.isValidForDoubleQuotingInBash("Marks & Spencer"));
-        Assert.assertTrue(BashStringEscapes.isValidForDoubleQuotingInBash("Marks \\&
Spencer"));
-        Assert.assertFalse(BashStringEscapes.isValidForDoubleQuotingInBash("Marks \\\\&
Spencer"));
+        Assert.assertTrue(BashStringEscapes.isValidForDoubleQuotingInBash("&"));
+        Assert.assertTrue(BashStringEscapes.isValidForDoubleQuotingInBash("Marks & Spencer"));
     }
 
     @Test


Mime
View raw message