From f57de338f785f52edabc8d5ba3a7e9a210f98514 Mon Sep 17 00:00:00 2001 From: dongxiaoyan Date: Fri, 8 May 2020 13:55:18 +0800 Subject: [PATCH] =?UTF-8?q?tsg=5Fshow=E8=BF=94=E5=9B=9E=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=EF=BC=8C=E4=BB=A3=E7=A0=81=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E4=B8=BA=E4=BD=BF=E7=94=A8=E6=8D=A2=E8=A1=8C=E6=88=AA=E5=8F=96?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02-Keyword/tsg_cli/Interface.robot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/02-Keyword/tsg_cli/Interface.robot b/02-Keyword/tsg_cli/Interface.robot index f75e725..5dedc8e 100644 --- a/02-Keyword/tsg_cli/Interface.robot +++ b/02-Keyword/tsg_cli/Interface.robot @@ -434,10 +434,12 @@ Run5 Write ${command} ${r} Read delay=10s Should Not Be Empty ${r} + #用换行符作为命令结束 ${str} Replace String ${r} ${\n} - ${index} Evaluate '${str}'.rindex('-') ${len} Convert To Integer ${index} ${json} Evaluate '${str}'[0:${len}] + #cli命令结果返回结束为换行使用下面截取 #${index} Evaluate '${r}'.rindex('tsgcli >') #${len} Convert To Integer ${index} #${json} Evaluate '${r}'[0:${len}]