Preserve extension names in module preflight
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user