Author: sebb
Date: Thu May  7 15:26:48 2009
New Revision: 772677

URL: http://svn.apache.org/viewvc?rev=772677&view=rev
Log:
Test backslash before other characters

Modified:
    jakarta/jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java

Modified: 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java?rev=772677&r1=772676&r2=772677&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java 
(original)
+++ 
jakarta/jmeter/trunk/test/src/org/apache/jmeter/engine/util/PackageTest.java 
Thu May  7 15:26:48 2009
@@ -159,11 +159,11 @@
 
        // Escaped dollar commma and backslash with no variable reference
     public void testParseExample11() throws Exception {
-        StringProperty prop = new StringProperty("html", "\\$a \\, \\\\ 
jakarta.apache.org");
+        StringProperty prop = new StringProperty("html", "\\$a \\, \\\\ \\x \\ 
jakarta.apache.org");
         JMeterProperty newProp = transformer.transformValue(prop);
         newProp.setRunningVersion(true);
         assertEquals("org.apache.jmeter.testelement.property.StringProperty", 
newProp.getClass().getName());
-        assertEquals("\\$a \\, \\\\ jakarta.apache.org", 
newProp.getStringValue());
+        assertEquals("\\$a \\, \\\\ \\x \\ jakarta.apache.org", 
newProp.getStringValue());
     }
 
     // N.B. See Bug 46831 which wanted to changed the behaviour of \$
@@ -172,29 +172,29 @@
     
     // Escaped dollar commma and backslash with variable reference
     public void testParseExample12() throws Exception {
-        StringProperty prop = new StringProperty("html", "\\$a \\, \\\\ 
${server} \\$b \\, \\\\ cd");
+        StringProperty prop = new StringProperty("html", "\\$a \\, \\\\ \\x \\ 
${server} \\$b \\, \\\\ cd");
         JMeterProperty newProp = transformer.transformValue(prop);
         newProp.setRunningVersion(true);
         // N.B. Backslashes are removed before dollar, comma and backslash
-        assertEquals("$a , \\ jakarta.apache.org $b , \\ cd", 
newProp.getStringValue());
+        assertEquals("$a , \\ \\x \\ jakarta.apache.org $b , \\ cd", 
newProp.getStringValue());
     }
 
     // Escaped dollar commma and backslash with missing variable reference
     public void testParseExample13() throws Exception {
-        StringProperty prop = new StringProperty("html", "\\$a \\, \\\\ 
${missing} \\$b \\, \\\\ cd");
+        StringProperty prop = new StringProperty("html", "\\$a \\, \\\\ \\x \\ 
${missing} \\$b \\, \\\\ cd");
         JMeterProperty newProp = transformer.transformValue(prop);
         newProp.setRunningVersion(true);
         // N.B. Backslashes are removed before dollar, comma and backslash
-        assertEquals("$a , \\ ${missing} $b , \\ cd", 
newProp.getStringValue());
+        assertEquals("$a , \\ \\x \\ ${missing} $b , \\ cd", 
newProp.getStringValue());
     }
 
     // Escaped dollar commma and backslash with missing function reference
     public void testParseExample14() throws Exception {
-        StringProperty prop = new StringProperty("html", "\\$a \\, \\\\ 
${__missing(a)} \\$b \\, \\\\ cd");
+        StringProperty prop = new StringProperty("html", "\\$a \\, \\\\ \\x \\ 
${__missing(a)} \\$b \\, \\\\ cd");
         JMeterProperty newProp = transformer.transformValue(prop);
         newProp.setRunningVersion(true);
         // N.B. Backslashes are removed before dollar, comma and backslash
-        assertEquals("$a , \\ ${__missing(a)} $b , \\ cd", 
newProp.getStringValue());
+        assertEquals("$a , \\ \\x \\ ${__missing(a)} $b , \\ cd", 
newProp.getStringValue());
     }
 
        public void testNestedExample1() throws Exception {



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to