fix(接口测试): 修复条件控制器变量值中有换行导致判断失败问题 (#6116)

Co-authored-by: BugKing <wangzhen@fit2cloud.com>
This commit is contained in:
metersphere-bot 2021-09-13 15:31:54 +08:00 committed by GitHub
parent 2a71b9bfcb
commit cac4b483b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ public class MsIfController extends MsTestElement {
value = "\"" + this.value + "\"";
}
if (StringUtils.contains(operator, "~")) {
value = "\".*" + this.value + ".*\"";
value = "\"(\\n|.)*" + this.value + "(\\n|.)*\"";
}
if (StringUtils.equals(operator, "is empty")) {

View File

@ -126,7 +126,7 @@ public class MsLoopController extends MsTestElement {
}
if (StringUtils.contains(operator, "~")) {
value = "\".*" + this.whileController.getValue() + ".*\"";
value = "\"(\\n|.)*" + this.whileController.getValue() + "(\\n|.)*\"";
}
if (StringUtils.equals(operator, "is empty")) {