Fix tail rows in portrait generation
This commit is contained in:
@@ -657,14 +657,16 @@ func TestBuildNativeAllocatesConfiguredDatasetsIntoFirstNullBaseRows(t *testing.
|
||||
{"id": 0, "key": "portraits:none", "BaseResRef": "****", "Sex": 4},
|
||||
{"id": 1, "BaseResRef": "****", "Sex": "****"},
|
||||
{"id": 2, "BaseResRef": null, "Sex": null},
|
||||
{"id": 3, "key": "portraits:existing", "BaseResRef": "existing_", "Sex": 1}
|
||||
{"id": 3, "key": "portraits:existing", "BaseResRef": "existing_", "Sex": 1},
|
||||
{"id": 4, "BaseResRef": "****", "Sex": "****"},
|
||||
{"id": 5, "BaseResRef": "****", "Sex": "****"}
|
||||
]
|
||||
}`+"\n")
|
||||
writeFile(t, filepath.Join(root, "topdata", "data", "portraits", "lock.json"), `{
|
||||
"portraits:none": 0,
|
||||
"portraits:existing": 3,
|
||||
"portraits:first": 4,
|
||||
"portraits:second": 5
|
||||
"portraits:first": 6,
|
||||
"portraits:second": 7
|
||||
}`+"\n")
|
||||
writeFile(t, filepath.Join(root, "topdata", "data", "portraits", "modules", "custom.json"), `{
|
||||
"entries": {
|
||||
@@ -698,6 +700,8 @@ func TestBuildNativeAllocatesConfiguredDatasetsIntoFirstNullBaseRows(t *testing.
|
||||
for _, want := range []string{
|
||||
"1\tfirst_\t4",
|
||||
"2\tsecond_\t4",
|
||||
"4\t****\t****",
|
||||
"5\t****\t****",
|
||||
} {
|
||||
if !strings.Contains(output, want) {
|
||||
t.Fatalf("expected generated portraits row %q, got:\n%s", want, output)
|
||||
|
||||
Reference in New Issue
Block a user