fix(测试跟踪): github#12826测试跟踪 --用例模板上传的用例;用例名称和内容是空的;标签中含有换行

--bug=1012557
https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001012557
--user=郭雨琦
This commit is contained in:
guoyuqi 2022-04-22 11:26:58 +08:00 committed by 刘瑞斌
parent 2d5b63e073
commit ae73e80773
1 changed files with 1 additions and 1 deletions

View File

@ -502,7 +502,7 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener<Map<Integ
return "[]";
} catch (Exception e) {
if (tags != null) {
Stream<String> stringStream = Arrays.stream(tags.split("[,;]")); //当标签值以中英文的逗号和分号分隔时才能正确解析
Stream<String> stringStream = Arrays.stream(tags.split("[,;\"\\r|\\n|\\r\\n\"]")); //当标签值以中英文的逗号和分号分隔时才能正确解析
List<String> tagList = stringStream.map(tag -> tag = "\"" + tag + "\"")
.collect(Collectors.toList());
String modifiedTags = StringUtils.join(tagList, ",");