linux下对字符串转换的不识别'${str}'.rindex('}') + 1

调整为:${testStr1}      Catenate    '''    ${str}       '''
    ${testIndex3}    Evaluate    ${testStr1}.rindex(

windows、linux下测试通过。
This commit is contained in:
dongxiaoyan
2020-06-18 10:06:08 +08:00
parent bbc604f568
commit 34c02dec90

View File

@@ -384,9 +384,22 @@ Run1_B
Should Contain ${r} Success
${str} Replace String ${r} ${\n} -
${str} Replace String ${str} ' \\'
${index} Evaluate '${str}'.rindex('}') + 1
${len} Convert To Integer ${index}
${json} Evaluate '${str}'[0:${len}]
#${index} Evaluate '${str}'.rindex('}') + 1
#${len} Convert To Integer ${index}
#${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}
Should Be True ${dict}[data][total] > 0
[Return] ${dict}
@@ -436,6 +449,7 @@ Run5
Should Not Be Empty ${r}
#用换行符作为命令结束
${str} Replace String ${r} ${\n} -
${index} Evaluate '${str}'.rindex('-')
${len} Convert To Integer ${index}
${json} Evaluate '${str}'[0:${len}]