Preserve extension names in module preflight

This commit is contained in:
2026-07-26 18:06:43 +03:00
parent ad4bd3ec72
commit 00040e5ce4
7 changed files with 440 additions and 17 deletions
+66
View File
@@ -112,6 +112,72 @@ def test_public_extension_form_candidate_is_name_first_and_prefers_title() -> No
}
def test_public_extension_module_candidate_is_name_first() -> None:
result = smoke.first_public_extension_module_candidate(
{
"modules": [
{
"streams": [
{
"preview": "\n&НаКлиенте\nПроцедура Команда()\nКонецПроцедуры",
"write_plan_target": {
"kind": "module",
"extension": "test2",
"ref": "Catalog.test2",
"form": "t_Форма",
"module": "Модуль формы",
"qualified_name": "test2.t_Форма.Модуль формы",
"stream_ordinal": 1,
},
}
]
}
]
}
)
assert result == {
"target": {
"kind": "module",
"extension": "test2",
"ref": "Catalog.test2",
"form": "t_Форма",
"module": "Модуль формы",
"qualified_name": "test2.t_Форма.Модуль формы",
"stream_ordinal": 1,
},
"intent": {
"operation": "replace_with_control",
"control_fragment": "&НаКлиенте",
"new": "&НаКлиенте\nПроцедура Команда()\nКонецПроцедуры",
},
}
def test_public_extension_module_candidate_rejects_storage_handle() -> None:
result = smoke.first_public_extension_module_candidate(
{
"modules": [
{
"streams": [
{
"preview": "Процедура Команда()\nКонецПроцедуры",
"write_plan_target": {
"extension": "test2",
"ref": "Catalog.test2",
"module": "Модуль формы",
"module_ref": "ConfigCASSave:opaque.0",
},
}
]
}
]
}
)
assert result is None
def test_different_extension_guid_changes_only_last_hex_digit() -> None:
assert (
smoke.different_extension_guid(