mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 16:42:19 +00:00
Localize the remaining Fig descriptions of 22 general-purpose commands that had 15 or fewer untranslated keys: echo, which, paste, pwd, clear, su, crontab, env, uname, base64, date, id, split, seq, join, dig, dd, htop, basename, dirname, readlink, and more. - Add 159 unique zh-CN entries (160 per-command entries; basename and dirname share one key) and regenerate zh-TW from them. - Preload the new specs and extend the untranslated-description audit and its preload assertions. - Add batch 4 coverage, semantics, insertion-text and zh-TW terminology tests plus the batch research note. - Keep upstream wording quirks documented instead of hidden: dig labels NS as "Query MX Record", readlink reuses stat wording, and date/su/env follow the BSD/macOS flags their specs actually expose.
21 lines
907 B
TypeScript
21 lines
907 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import { COMMON_FIG_SPECS, normalizeCommandName } from "./autocomplete/figSpecLoader";
|
|
|
|
test("preload common specs includes dnf alongside yum and apt", () => {
|
|
assert.ok(COMMON_FIG_SPECS.includes("apt"));
|
|
assert.ok(COMMON_FIG_SPECS.includes("yum"));
|
|
assert.ok(COMMON_FIG_SPECS.includes("dnf"));
|
|
for (const command of ["ln", "stat", "wc", "cut", "uniq", "tee", "xargs"]) {
|
|
assert.ok(COMMON_FIG_SPECS.includes(command), `${command} should be preloaded`);
|
|
}
|
|
for (const command of ["basename", "dirname", "readlink", "more", "seq", "dig", "htop"]) {
|
|
assert.ok(COMMON_FIG_SPECS.includes(command), `${command} should be preloaded`);
|
|
}
|
|
});
|
|
|
|
test("normalizeCommandName strips path and extension", () => {
|
|
assert.equal(normalizeCommandName("/usr/bin/dnf"), "dnf");
|
|
assert.equal(normalizeCommandName("DNF"), "dnf");
|
|
});
|