suite retire и проверка словаря в документе для читателя
- suite retire снимает правило, конвенцию или тему: правило остаётся заглушкой с датой и причиной, имя уезжает в раздел выбывших, снятие с непогашенными ссылками отклоняется с перечнем мест - добавлена проверка META-30: короткое описание языка обязано называть все слова словаря, иначе читатель копии толкует их по памяти - retired-раздел манифеста больше не считается объявлением пути: снятый префикс означает, что файл ушёл вместе с ним
This commit is contained in:
@@ -58,6 +58,15 @@ prefix: TIME
|
||||
**ПОЧЕМУ.** Без явного смещения не видно, в какой зоне запись сделана.
|
||||
`
|
||||
|
||||
// reading stands for the short account of the language, the one document about
|
||||
// it that travels into a copy. It has to name every word of the vocabulary:
|
||||
// that is the whole of META-30.
|
||||
const reading = `# Как читать конвенцию
|
||||
|
||||
Ключевые слова: ДОЛЖЕН, НЕ ДОЛЖЕН, СЛЕДУЕТ, НЕ СЛЕДУЕТ, ДОПУСКАЕТСЯ.
|
||||
Метки: ПОЧЕМУ, ПРИМЕРЫ, МЕХАНИЗИРОВАНО, СНЯТО.
|
||||
`
|
||||
|
||||
// files is the content of a suite: a path from the root mapped to the text of
|
||||
// the file. An empty string means "no such file": that is how a test drops a
|
||||
// file the base fixture provides.
|
||||
@@ -67,7 +76,7 @@ func base() files {
|
||||
return files{
|
||||
"suite.toml": baseManifest,
|
||||
"LANGUAGE.md": "# Язык конвенций\n\nОписание языка.\n",
|
||||
"READING.md": "# Как читать конвенцию\n\nКоротко.\n",
|
||||
"READING.md": reading,
|
||||
"conventions/time.md": baseTime,
|
||||
}
|
||||
}
|
||||
@@ -374,6 +383,12 @@ func TestChecks(t *testing.T) {
|
||||
f["conventions/rules.md"] = "---\nprefix: RULE\n---\n\n# Правила\n\n" + versionLine + "\n"
|
||||
},
|
||||
want: "more than one document without a topic",
|
||||
}, {
|
||||
name: "the short account of the language lost a word of the vocabulary",
|
||||
setup: func(f files) {
|
||||
f["READING.md"] = strings.Replace(reading, ", ДОПУСКАЕТСЯ", "", 1)
|
||||
},
|
||||
want: "does not name ДОПУСКАЕТСЯ",
|
||||
}, {
|
||||
name: "document without a topic carries layer keys",
|
||||
setup: func(f files) {
|
||||
|
||||
Reference in New Issue
Block a user