diff --git a/plugins/NewTest.java b/plugins/NewTest.java index 910fd6e..78c2238 100644 --- a/plugins/NewTest.java +++ b/plugins/NewTest.java @@ -63,6 +63,8 @@ public class NewTest extends javax.swing.JPanel { public static String ALLOWED_CHARSET1 = "[a-z A-Z 0-9 . _ \\- \\[\\] () : , < > = \\$]*"; //les restricted set of chars public static String ALLOWED_CHARSET2 = "[a-z A-Z 0-9 . _ \\- \\[\\] () : , \\$]*"; //more restricted set of chars public static String ALLOWED_CHARSET3 = "[a-zA-Z0-9._ \\- \\$ , :]*"; //even more restricted set of chars + public static String VALUE_SEPARATOR = "|"; + public static String PARAM_SEPARATOR = ";"; /** * enumeration of table column indexes @@ -786,7 +788,7 @@ public class NewTest extends javax.swing.JPanel { value = (String) attributes.get("value"); description = (String) attributes.get("description"); //build the python code for getting the test parameter - sTestParameters = sTestParameters + name + ":" + value + ":" + description + ";" ; + sTestParameters = sTestParameters + name + VALUE_SEPARATOR + value + VALUE_SEPARATOR + description + PARAM_SEPARATOR ; } } FileInputStream in = new FileInputStream(configFile); @@ -857,10 +859,10 @@ public class NewTest extends javax.swing.JPanel { if(param instanceof String){ name = (String) param; HashMap attributes = (HashMap) hmTestParams.get(param); - value = attributes.get("value").toString().replace("\\:",":"); + value = (String) attributes.get("value"); description = (String) attributes.get("description"); //build the python code for getting the test parameter - sTestParameters = sTestParameters + name + "&" + value + "&" + description + ";" ; + sTestParameters = sTestParameters + name + VALUE_SEPARATOR + value + VALUE_SEPARATOR + description + PARAM_SEPARATOR ; } } FileInputStream in = new FileInputStream(configFile); diff --git a/script/tests/tests/sad/jtr/.config b/script/tests/tests/sad/jtr/.config index f54e454..f1762c6 100644 --- a/script/tests/tests/sad/jtr/.config +++ b/script/tests/tests/sad/jtr/.config @@ -1,4 +1,4 @@ -#Thu Oct 12 16:32:00 CEST 2017 +#Thu Oct 12 16:38:34 CEST 2017 name=jtr -parameters=ds&2,IQCOM,$GNT3,1,DIA\:23&bla; -description=dede +parameters=dv&2,IQCOM,$GNT3,1,DIA\:23&fdv; +description=d v diff --git a/script/tests/tests/sad/jtr/help.html b/script/tests/tests/sad/jtr/help.html index ea8c54f..1c5f314 100644 --- a/script/tests/tests/sad/jtr/help.html +++ b/script/tests/tests/sad/jtr/help.html @@ -2,10 +2,10 @@

Description

-dede +d v

Parameters

- +
ds bla
dv fdv

Contact

diff --git a/script/tests/tests/sad/jtr/jtr.py b/script/tests/tests/sad/jtr/jtr.py index 8dea6e6..cffc643 100644 --- a/script/tests/tests/sad/jtr/jtr.py +++ b/script/tests/tests/sad/jtr/jtr.py @@ -1,5 +1,5 @@ # Test name: jtr -# dede +# d v # Copyright (c) 2015 Paul Scherrer Institute. All rights reserved. ###### Init - DO NOT MODIFY THE CODE BELOW ###### @@ -72,7 +72,7 @@ def startTest(testName, DEVICE, params): test.printParams() # If present, use the parameters here below for your test script. # These parameters were automatically generated: you might need to change the casting. - ds = float(test.getParam('ds')) ; + dv = float(test.getParam('dv')) ; except: # test failed, write the report into the variables ret and success and send feedback: ret = 'Could not retrieve testing parameters - ' + traceback.format_exc()