linux下对字符串转换的不识别'${str}'.rindex('}') + 1
调整为:${testStr1} Catenate ''' ${str} '''
${testIndex3} Evaluate ${testStr1}.rindex(
windows、linux下测试通过。
This commit is contained in:
@@ -384,9 +384,22 @@ Run1_B
|
|||||||
Should Contain ${r} Success
|
Should Contain ${r} Success
|
||||||
${str} Replace String ${r} ${\n} -
|
${str} Replace String ${r} ${\n} -
|
||||||
${str} Replace String ${str} ' \\'
|
${str} Replace String ${str} ' \\'
|
||||||
${index} Evaluate '${str}'.rindex('}') + 1
|
#${index} Evaluate '${str}'.rindex('}') + 1
|
||||||
${len} Convert To Integer ${index}
|
#${len} Convert To Integer ${index}
|
||||||
${json} Evaluate '${str}'[0:${len}]
|
#${json} Evaluate '${str}'[0:${len}]
|
||||||
|
|
||||||
|
#${testStr} Catenate ''' ${str} '''
|
||||||
|
#${testIndex3} Evaluate ${testStr}.rindex('}')
|
||||||
|
#Log ${testIndex3}
|
||||||
|
#${len} Convert To Integer ${testIndex3}
|
||||||
|
#${json} Get Substring ${str} 0 ${len}
|
||||||
|
|
||||||
|
${testStr1} Catenate ''' ${str} '''
|
||||||
|
${testIndex3} Evaluate ${testStr1}.rindex('-') - 1
|
||||||
|
Log ${testIndex3}
|
||||||
|
${len} Convert To Integer ${testIndex3}
|
||||||
|
${json} Get Substring ${str} 0 ${len}
|
||||||
|
Log ${json}
|
||||||
${dict} json.Loads ${json}
|
${dict} json.Loads ${json}
|
||||||
Should Be True ${dict}[data][total] > 0
|
Should Be True ${dict}[data][total] > 0
|
||||||
[Return] ${dict}
|
[Return] ${dict}
|
||||||
@@ -436,6 +449,7 @@ Run5
|
|||||||
Should Not Be Empty ${r}
|
Should Not Be Empty ${r}
|
||||||
#用换行符作为命令结束
|
#用换行符作为命令结束
|
||||||
${str} Replace String ${r} ${\n} -
|
${str} Replace String ${r} ${\n} -
|
||||||
|
|
||||||
${index} Evaluate '${str}'.rindex('-')
|
${index} Evaluate '${str}'.rindex('-')
|
||||||
${len} Convert To Integer ${index}
|
${len} Convert To Integer ${index}
|
||||||
${json} Evaluate '${str}'[0:${len}]
|
${json} Evaluate '${str}'[0:${len}]
|
||||||
|
|||||||
Reference in New Issue
Block a user