test(support-guard): committed deny-тесты на 13 навыков-мутаторов + фикс help-add

Регрессионная защита гарда: по одному expectError-кейсу guard-deny на
каждый из 13 размноженных мутаторов (раньше committed-тесты были только
у 3 пилотных). Ловит случайное удаление/поломку guard-вызова в будущем.

Фикстуры on-support (рукотворный bin: корень/объект f1=0, плюс элемент
f1=0 для edit-existing навыков — форма 4444, макет 5555, подсистема 6666).
Структура под конвенцию каждого навбыка: owner/root для add/compile/edit
конфигурации; плоский Locked/Ext для help-add (EPF-стиль).

Заодно исправлен пред-существующий баг help-add Detect-FormatVersion
(v1.5→v1.6, оба порта): Substring(0, byteLength) падал на кириллическом
Configuration.xml (байт>символов). Теперь Substring по длине строки;
фикстура help-add кириллическая — регрессия фикса покрыта тестом.

Все 13 guard-кейсов зелёные на PowerShell и Python; deny через exit≠0 +
stderr "support-guard". Существующие кейсы не затронуты.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-06-20 15:45:50 +03:00
parent b17dd5d04c
commit acbd6be46c
72 changed files with 653 additions and 3 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
# help-add v1.5 — Add built-in help to 1C object
# help-add v1.6 — Add built-in help to 1C object
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[Parameter(Mandatory)]
@@ -126,7 +126,8 @@ function Detect-FormatVersion([string]$dir) {
while ($d) {
$cfgPath = Join-Path $d "Configuration.xml"
if (Test-Path $cfgPath) {
$head = [System.IO.File]::ReadAllText($cfgPath, [System.Text.Encoding]::UTF8).Substring(0, [Math]::Min(2000, (Get-Item $cfgPath).Length))
$content = [System.IO.File]::ReadAllText($cfgPath, [System.Text.Encoding]::UTF8)
$head = $content.Substring(0, [Math]::Min(2000, $content.Length))
if ($head -match '<MetaDataObject[^>]+version="(\d+\.\d+)"') { return $Matches[1] }
}
$parent = Split-Path $d -Parent
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# add-help v1.5 — Add built-in help to 1C object
# add-help v1.6 — Add built-in help to 1C object
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333}
@@ -0,0 +1,14 @@
{
"name": "Guard: правка корня конфигурации на замке (f1=0) запрещена",
"setup": "fixture:on-support",
"input": {
"operations": [
{
"op": "set-property",
"property": "Comment",
"value": "x"
}
]
},
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333}
@@ -0,0 +1,9 @@
{
"name": "Guard: добавление формы к объекту на замке (f1=0) запрещено",
"setup": "fixture:on-support",
"params": {
"objectPath": "Catalogs/Locked.xml"
},
"formName": "НовФорма",
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333}
@@ -0,0 +1,12 @@
{
"name": "Guard: компиляция формы для объекта на замке (f1=0) запрещена",
"setup": "fixture:on-support",
"params": {
"outputPath": "Catalogs/Locked/Forms/НовФорма/Ext/Form.xml"
},
"input": {
"title": "Тест",
"elements": []
},
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" version="2.17"><Form uuid="44444444-4444-4444-4444-444444444444"><Properties><Name>ТестФорма</Name></Properties><ChildObjects/></Form></MetaDataObject>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17"><Title><v8:item xmlns:v8="http://v8.1c.ru/8.1/data/core"><v8:lang>ru</v8:lang><v8:content>Тест</v8:content></v8:item></Title></Form>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333,0,0,44444444-4444-4444-4444-444444444444,44444444-4444-4444-4444-444444444444}
@@ -0,0 +1,18 @@
{
"name": "Guard: правка формы на замке (f1=0) запрещена",
"setup": "fixture:on-support",
"params": {
"formPath": "Catalogs/Locked/Forms/ТестФорма/Ext/Form.xml"
},
"input": {
"operations": [
{
"op": "add-attribute",
"name": "Рек",
"type": "String",
"length": 5
}
]
},
"expectError": "support-guard"
}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" version="2.17"><Configuration uuid="11111111-1111-1111-1111-111111111111"><Properties><Name>ТестоваяКонфигурацияСКириллицей</Name></Properties><ChildObjects/></Configuration></MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","Vend","Cfg",2,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" version="2.17"><Catalog uuid="22222222-2222-2222-2222-222222222222"><Properties><Name>Locked</Name></Properties><ChildObjects/></Catalog></MetaDataObject>
@@ -0,0 +1,6 @@
{
"name": "Guard: добавление справки к объекту на замке (f1=0) запрещено",
"setup": "fixture:on-support",
"objectName": "Locked",
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333,0,0,66666666-6666-6666-6666-666666666666,66666666-6666-6666-6666-666666666666}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" version="2.17"><Subsystem uuid="66666666-6666-6666-6666-666666666666"><Properties><Name>ТестПодсистема</Name></Properties><ChildObjects/></Subsystem></MetaDataObject>
@@ -0,0 +1,12 @@
{
"name": "Guard: правка командного интерфейса подсистемы на замке (f1=0) запрещена",
"setup": "fixture:on-support",
"params": {
"ciPath": "Subsystems/ТестПодсистема/Ext/CommandInterface.xml"
},
"input": {
"operations": []
},
"CreateIfMissing": true,
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333}
@@ -0,0 +1,24 @@
{
"name": "Guard: компиляция макета для объекта на замке (f1=0) запрещена",
"setup": "fixture:on-support",
"input": {
"columns": 2,
"areas": [
{
"name": "О",
"rows": [
{
"cells": [
{
"col": 1,
"text": "a"
}
]
}
]
}
]
},
"outputPath": "Catalogs/Locked/Templates/НовМакет/Ext/Template.xml",
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333}
@@ -0,0 +1,9 @@
{
"name": "Guard: добавление роли при закрытом корне (f1=0) запрещено",
"setup": "fixture:on-support",
"input": {
"name": "НовРоль",
"rights": {}
},
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333}
@@ -0,0 +1,16 @@
{
"name": "Guard: компиляция СКД для объекта на замке (f1=0) запрещена",
"setup": "fixture:on-support",
"params": {
"outputPath": "Catalogs/Locked/Templates/НовСхема/Ext/Template.xml"
},
"input": {
"dataSets": [
{
"name": "Набор1",
"query": "ВЫБРАТЬ 1 КАК Поле1"
}
]
},
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" version="2.17"><Template uuid="55555555-5555-5555-5555-555555555555"><Properties><Name>ТестСхема</Name><TemplateType>DataCompositionSchema</TemplateType></Properties><ChildObjects/></Template></MetaDataObject>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"/>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333,0,0,55555555-5555-5555-5555-555555555555,55555555-5555-5555-5555-555555555555}
@@ -0,0 +1,10 @@
{
"name": "Guard: правка СКД на замке (f1=0) запрещена",
"setup": "fixture:on-support",
"params": {
"templatePath": "Catalogs/Locked/Templates/ТестСхема/Ext/Template.xml"
},
"operation": "add-parameter",
"value": "П: Строка",
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333}
@@ -0,0 +1,8 @@
{
"name": "Guard: добавление подсистемы при закрытом корне (f1=0) запрещено",
"setup": "fixture:on-support",
"input": {
"name": "НовПодсистема"
},
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333,0,0,66666666-6666-6666-6666-666666666666,66666666-6666-6666-6666-666666666666}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" version="2.17"><Subsystem uuid="66666666-6666-6666-6666-666666666666"><Properties><Name>ТестПодсистема</Name></Properties><ChildObjects/></Subsystem></MetaDataObject>
@@ -0,0 +1,18 @@
{
"name": "Guard: правка подсистемы на замке (f1=0) запрещена",
"setup": "fixture:on-support",
"params": {
"subsystemPath": "Subsystems/ТестПодсистема.xml"
},
"input": {
"operations": [
{
"op": "set-property",
"property": "Comment",
"value": "x"
}
]
},
"NoValidate": true,
"expectError": "support-guard"
}
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="22222222-2222-2222-2222-222222222222">
<Properties>
<Name>Locked</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Catalog uuid="33333333-3333-3333-3333-333333333333">
<Properties>
<Name>Removed</Name>
<Synonym/>
<CodeLength>9</CodeLength>
<DescriptionLength>25</DescriptionLength>
</Properties>
<ChildObjects/>
</Catalog>
</MetaDataObject>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" version="2.17">
<Configuration uuid="11111111-1111-1111-1111-111111111111">
<Properties>
<Name>ТестКонфиг</Name>
<Vendor>ТестВендор</Vendor>
<Version>1.0</Version>
</Properties>
<ChildObjects>
<Catalog>Locked</Catalog>
<Catalog>Removed</Catalog>
</ChildObjects>
</Configuration>
</MetaDataObject>
@@ -0,0 +1 @@
{6,0,1,aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa,0,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb,"1.0","ТестВендор","ТестКонфиг",3,0,0,11111111-1111-1111-1111-111111111111,0,0,22222222-2222-2222-2222-222222222222,22222222-2222-2222-2222-222222222222,2,0,33333333-3333-3333-3333-333333333333,33333333-3333-3333-3333-333333333333}
@@ -0,0 +1,8 @@
{
"name": "Guard: добавление макета к объекту на замке (f1=0) запрещено",
"setup": "fixture:on-support",
"objectName": "Locked",
"templateName": "НовМакет",
"templateType": "SpreadsheetDocument",
"expectError": "support-guard"
}