regex of "${endpoint}[0-9a-z]" changed for robot 3.1
In 'Get Endpoint Paths' a regular expression containing the following substring
was mis-interpreted by robot 3.1:
${endpoint}[0-9a-z]
This resulted in an error like this:
Variable '${endpoint}' is string, not list or dictionary, and thus accessing
item '0-9a-z' from it is not possible.
The fix is to add a backslash to escape the left square bracket.
${endpoint}\[0-9a-z]
Change-Id: I06a2f5fa3903579e80e498cc1085799a4cc15eb5
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 81b82a2..5847ced 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -957,7 +957,7 @@
# For a given string, look for prefix and suffix for matching expression.
# Start of string followed by zero or more of any character followed by
# any digit or lower case character.
- ${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${endpoint}[0-9a-z]*$
+ ${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${endpoint}\[0-9a-z]*$
[Return] ${resp}