提交 9283004b 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

random on use_yaml field

上级 99a8f44c
...@@ -44,6 +44,7 @@ fields: ...@@ -44,6 +44,7 @@ fields:
- field: field_use_yaml - field: field_use_yaml
range: 9-7,test/nested1.yaml{5} range: 9-7,test/nested1.yaml{5}
rand: true
prefix: "***" prefix: "***"
postfix: "***\t" postfix: "***\t"
......
...@@ -24,12 +24,6 @@ fields: ...@@ -24,12 +24,6 @@ fields:
postfix: "\t" postfix: "\t"
# width: 25 # width: 25
- field: test3
range: test/test.yaml{2},a-z:R{3}
prefix: "---"
postfix: "---\t"
# width: 25
- field: field_with_children - field: field_with_children
fields: fields:
- field: child1 - field: child1
......
...@@ -230,6 +230,10 @@ func CreateValuesFromYaml(field *model.DefField, yamlFile, stepStr string, repea ...@@ -230,6 +230,10 @@ func CreateValuesFromYaml(field *model.DefField, yamlFile, stepStr string, repea
rows, colIsNumArr, _ := GenerateForDefinition("", configFile, &fieldsToExport) rows, colIsNumArr, _ := GenerateForDefinition("", configFile, &fieldsToExport)
items = Print(rows, constant.FormatData, "", colIsNumArr, fieldsToExport) items = Print(rows, constant.FormatData, "", colIsNumArr, fieldsToExport)
if field.Rand {
rows = randomValues(rows)
}
if repeat > 0 { if repeat > 0 {
if repeat > len(items) - 1 { if repeat > len(items) - 1 {
repeat = len(items) - 1 repeat = len(items) - 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册