test(form-compile): regression tests for new --from-object types

8 test cases covering InformationRegister (Record periodic/nonperiodic, List),
AccumulationRegister (List), ChartOfCharacteristicTypes (Item),
ExchangePlan (Item), ChartOfAccounts (Item, List).

All 12 tests pass on both PS1 and Python runtimes with form-validate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-04-13 13:21:46 +03:00
parent b8ab791456
commit 3ee715939b
8 changed files with 222 additions and 0 deletions
@@ -0,0 +1,29 @@
{
"name": "AccumulationRegister List — Balances, 2 измерения + 3 ресурса",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "AccumulationRegister",
"name": "ДенежныеСредства",
"registerType": "Balances",
"dimensions": [
{ "name": "Организация", "type": "String", "length": 50 },
{ "name": "БанковскийСчет", "type": "String", "length": 34 }
],
"resources": [
{ "name": "Сумма", "type": "Number", "length": 15, "precision": 2 },
{ "name": "СуммаВалютная", "type": "Number", "length": 15, "precision": 2 },
{ "name": "СуммаУпр", "type": "Number", "length": 15, "precision": 2 }
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/AccumulationRegisters/ДенежныеСредства.xml", "-FormName": "ФормаСписка" }
}
],
"params": { "outputPath": "AccumulationRegisters/ДенежныеСредства/Forms/ФормаСписка/Ext/Form.xml" },
"validatePath": "AccumulationRegisters/ДенежныеСредства/Forms/ФормаСписка/Ext/Form.xml"
}
@@ -0,0 +1,21 @@
{
"name": "ChartOfCharacteristicTypes Item — простой ПВХ (код + наименование)",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "ChartOfCharacteristicTypes",
"name": "ВидыНоменклатуры",
"codeLength": 9,
"descriptionLength": 100
},
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/ChartsOfCharacteristicTypes/ВидыНоменклатуры.xml", "-FormName": "ФормаЭлемента" }
}
],
"params": { "outputPath": "ChartsOfCharacteristicTypes/ВидыНоменклатуры/Forms/ФормаЭлемента/Ext/Form.xml" },
"validatePath": "ChartsOfCharacteristicTypes/ВидыНоменклатуры/Forms/ФормаЭлемента/Ext/Form.xml"
}
@@ -0,0 +1,30 @@
{
"name": "ChartOfAccounts Item — план счетов с флагами и субконто",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "ChartOfAccounts",
"name": "Хозрасчетный",
"codeLength": 9,
"descriptionLength": 100,
"maxExtDimensionCount": 3,
"accountingFlags": [
{ "name": "Валютный" },
{ "name": "Количественный" }
],
"extDimensionAccountingFlags": [
{ "name": "Валютный" },
{ "name": "Количественный" }
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/ChartsOfAccounts/Хозрасчетный.xml", "-FormName": "ФормаСчета" }
}
],
"params": { "outputPath": "ChartsOfAccounts/Хозрасчетный/Forms/ФормаСчета/Ext/Form.xml" },
"validatePath": "ChartsOfAccounts/Хозрасчетный/Forms/ФормаСчета/Ext/Form.xml"
}
@@ -0,0 +1,30 @@
{
"name": "ChartOfAccounts List — план счетов, форма списка",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "ChartOfAccounts",
"name": "Хозрасчетный",
"codeLength": 9,
"descriptionLength": 100,
"maxExtDimensionCount": 3,
"accountingFlags": [
{ "name": "Валютный" },
{ "name": "Количественный" }
],
"extDimensionAccountingFlags": [
{ "name": "Валютный" },
{ "name": "Количественный" }
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/ChartsOfAccounts/Хозрасчетный.xml", "-FormName": "ФормаСписка" }
}
],
"params": { "outputPath": "ChartsOfAccounts/Хозрасчетный/Forms/ФормаСписка/Ext/Form.xml" },
"validatePath": "ChartsOfAccounts/Хозрасчетный/Forms/ФормаСписка/Ext/Form.xml"
}
@@ -0,0 +1,25 @@
{
"name": "ExchangePlan Item — простой план обмена с 2 реквизитами",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "ExchangePlan",
"name": "ОбменДанными",
"codeLength": 9,
"descriptionLength": 100,
"attributes": [
{ "name": "АдресОбмена", "type": "String", "length": 200 },
{ "name": "ДатаПоследнегоОбмена", "type": "Date" }
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/ExchangePlans/ОбменДанными.xml", "-FormName": "ФормаЭлемента" }
}
],
"params": { "outputPath": "ExchangePlans/ОбменДанными/Forms/ФормаЭлемента/Ext/Form.xml" },
"validatePath": "ExchangePlans/ОбменДанными/Forms/ФормаЭлемента/Ext/Form.xml"
}
@@ -0,0 +1,28 @@
{
"name": "InformationRegister List — периодический (Day), RecorderSubordinate, 2 измерения + 1 ресурс",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "InformationRegister",
"name": "ЦеныНоменклатуры",
"periodicity": "Day",
"writeMode": "RecorderSubordinate",
"dimensions": [
{ "name": "Номенклатура", "type": "String", "length": 50 },
{ "name": "ВидЦены", "type": "String", "length": 25 }
],
"resources": [
{ "name": "Цена", "type": "Number", "length": 15, "precision": 2 }
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/InformationRegisters/ЦеныНоменклатуры.xml", "-FormName": "ФормаСписка" }
}
],
"params": { "outputPath": "InformationRegisters/ЦеныНоменклатуры/Forms/ФормаСписка/Ext/Form.xml" },
"validatePath": "InformationRegisters/ЦеныНоменклатуры/Forms/ФормаСписка/Ext/Form.xml"
}
@@ -0,0 +1,30 @@
{
"name": "InformationRegister Record — непериодический, Independent, 1 измерение + 1 ресурс + 1 реквизит",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "InformationRegister",
"name": "АдресаМагазинов",
"periodicity": "Nonperiodical",
"writeMode": "Independent",
"dimensions": [
{ "name": "Магазин", "type": "String", "length": 50 }
],
"resources": [
{ "name": "Адрес", "type": "String", "length": 200 }
],
"attributes": [
{ "name": "Комментарий", "type": "String", "length": 500 }
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/InformationRegisters/АдресаМагазинов.xml", "-FormName": "ФормаЗаписи" }
}
],
"params": { "outputPath": "InformationRegisters/АдресаМагазинов/Forms/ФормаЗаписи/Ext/Form.xml" },
"validatePath": "InformationRegisters/АдресаМагазинов/Forms/ФормаЗаписи/Ext/Form.xml"
}
@@ -0,0 +1,29 @@
{
"name": "InformationRegister Record — периодический (Day), Independent, 2 измерения + 2 ресурса",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "InformationRegister",
"name": "КурсыВалют",
"periodicity": "Day",
"writeMode": "Independent",
"dimensions": [
{ "name": "Валюта", "type": "String", "length": 10 },
{ "name": "Организация", "type": "String", "length": 50 }
],
"resources": [
{ "name": "Курс", "type": "Number", "length": 15, "precision": 4 },
{ "name": "Кратность", "type": "Number", "length": 10 }
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/InformationRegisters/КурсыВалют.xml", "-FormName": "ФормаЗаписи" }
}
],
"params": { "outputPath": "InformationRegisters/КурсыВалют/Forms/ФормаЗаписи/Ext/Form.xml" },
"validatePath": "InformationRegisters/КурсыВалют/Forms/ФормаЗаписи/Ext/Form.xml"
}