@@ -127,24 +127,48 @@ def test_check_equipment_variant_rejects_invalid_or_ambiguous_input(fake_mod_roo
127127
128128@pytest .mark .integration
129129def test_check_equipment_variant_uses_current_mod_rules (real_mod_root ):
130+ # Mirrors Zulfiqar in history/countries/PER - Iran.txt.
130131 valid = """create_equipment_variant = {
132+ name = "Zulfiqar"
131133 type = medium_tank_chassis_1
134+ parent_version = 0
132135 modules = {
136+ main_armament_slot = tank_medium_cannon_2
137+ ammunition_load_slot = mixed_main_ammo_2
138+ turret_type_slot = tank_base_tank_turret
139+ suspension_type_slot = tank_torsion_bar_suspension_medium
140+ armor_type_slot = tank_composite_armor_gen1
133141 engine_type_slot = tank_diesel_engine_gen3
142+ reload_type_slot = automatic_loading
143+ special_type_slot_1 = smoke_launchers
144+ special_type_slot_2 = empty
145+ special_type_slot_4 = tank_battlestation_2
146+ special_type_slot_6 = reactive_armor_gen1
134147 }
148+ upgrades = {
149+ tank_nsb_armor_upgrade = 3
150+ }
151+ icon = "gfx/interface/technologies/PER/LAND/Zulfiqar.dds"
135152}"""
136153
137154 clean = check_equipment_variant_tool (EquipmentVariantChecker (real_mod_root ), valid )
138155 invalid = check_equipment_variant_tool (
139- EquipmentVariantChecker (real_mod_root ), valid .replace ("engine_type_slot" , "missing_slot" )
156+ EquipmentVariantChecker (real_mod_root ),
157+ valid .replace (
158+ " modules = {\n " ,
159+ " modules = {\n missing_slot = tank_diesel_engine_gen3\n " ,
160+ ),
140161 )
141162
142163 assert clean ["ok" ] is True
143164 assert clean ["valid" ] is True
165+ assert clean ["issues" ] == []
144166 assert invalid ["ok" ] is True
167+ assert invalid ["valid" ] is False
168+ assert invalid ["issues_total" ] == 1
145169 assert invalid ["issues" ] == [
146170 {
147- "line" : 4 ,
171+ "line" : 6 ,
148172 "severity" : "error" ,
149173 "kind" : "unknown_slot" ,
150174 "message" : (
0 commit comments