More tests
This commit is contained in:
@@ -2921,6 +2921,42 @@ func TestParseFamilyExpansionRejectsInvalidLegacyFamilyKeys(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateBaseitemsWeaponFeatColumnCompletenessRejectsPartialCoreFamilies(t *testing.T) {
|
||||
ctx := &featGeneratedContext{
|
||||
rowsByDataset: map[string]map[string]map[string]any{
|
||||
"baseitems": {
|
||||
"baseitems:testblade": {
|
||||
"key": "baseitems:testblade",
|
||||
"WeaponFocusFeat": 1000,
|
||||
"WeaponSpecializationFeat": 1001,
|
||||
"WeaponImprovedCriticalFeat": 1002,
|
||||
"EpicWeaponFocusFeat": 1003,
|
||||
"EpicWeaponSpecializationFeat": 1004,
|
||||
"EpicWeaponOverwhelmingCriticalFeat": "****",
|
||||
},
|
||||
"baseitems:prop": {
|
||||
"key": "baseitems:prop",
|
||||
"WeaponType": 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
report := ValidationReport{}
|
||||
|
||||
validateBaseitemsWeaponFeatColumnCompleteness("generated", ctx, &report)
|
||||
|
||||
if !report.HasErrors() {
|
||||
t.Fatalf("expected partial core weapon feat columns to be rejected")
|
||||
}
|
||||
if len(report.Diagnostics) != 1 {
|
||||
t.Fatalf("expected one diagnostic, got %#v", report.Diagnostics)
|
||||
}
|
||||
if !strings.Contains(report.Diagnostics[0].Message, "baseitems:testblade") ||
|
||||
!strings.Contains(report.Diagnostics[0].Message, "EpicWeaponOverwhelmingCriticalFeat") {
|
||||
t.Fatalf("unexpected diagnostic: %#v", report.Diagnostics[0])
|
||||
}
|
||||
}
|
||||
|
||||
func TestPruneRetiredGeneratedFeatTLKEntries(t *testing.T) {
|
||||
root := testProjectRoot(t)
|
||||
mkdirAll(t, filepath.Join(root, "topdata", "data", "feat", "generated"))
|
||||
|
||||
Reference in New Issue
Block a user