Files
cc-1c-skills/tests/skills/cases/skd-edit/patch-query-diag-nbsp.json
T
Nick Shirokov ce1ba0bab1 feat(skd-edit): normalize line endings + diagnostics on patch-query not-found
patch-query теперь нормализует CRLF/CR → LF в old/new/query перед поиском,
поэтому многострочные шаблоны с любым стилем переводов строк находятся
корректно (XmlDocument декодирует text-узлы как LF).

При not-found вместо сухого сообщения выводится воронка диагностики:
  1) cross-dataset probe — «Found in dataset 'Y' instead — wrong -DataSet?»
  2) tolerant probe (collapse whitespace + NBSP) — «would match with
     whitespace normalized» + точка расхождения
  3) prefix divergence — «matched N of M chars, expected 'X' (U+...) but
     got 'Y' (U+...)» + короткий контекст

Тесты: 4 новых кейса (positive CRLF-tolerant + 3 диагностических negative).
Регрессия 45/45 PS + 45/45 Python.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 19:53:24 +03:00

30 lines
738 B
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "patch-query: diagnostic — NBSP в search улавливается tolerant probe",
"preRun": [
{
"script": "skd-compile/scripts/skd-compile",
"input": {
"dataSets": [
{
"name": "Основной",
"query": "ВЫБРАТЬ Т.Поле ИЗ Регистр КАК Т",
"fields": [
"Поле"
]
}
]
},
"args": {
"-DefinitionFile": "{inputFile}",
"-OutputPath": "{workDir}/Template.xml"
}
}
],
"params": {
"templatePath": "Template.xml",
"operation": "patch-query",
"value": "ВЫБРАТЬ Т.Поле => x"
},
"expectError": "whitespace normalized"
}