fix: 清理 trans 文本旧入口示例
This commit is contained in:
@@ -79,11 +79,17 @@ describe("ssh bounded progressive help", () => {
|
||||
expect(scoped.usage[0]).toBe("trans <route> cat <remote-text-file>");
|
||||
expect(serialized).toContain("text-transfer-discouraged");
|
||||
expect(serialized).toContain("--allow-text-transfer");
|
||||
expect(scoped.examples.host).toContain("download /tmp/trace.json ./trace.json");
|
||||
expect(scoped.examples.host).toContain("download /tmp/firmware.bin ./firmware.bin");
|
||||
expect(scoped.examples.k3sWorkload).toBe(
|
||||
"trans NC01:k3s:hwlab-v03:hwlab-cloud-api:hwlab-cloud-api download /tmp/trace.json ./trace.json",
|
||||
"trans NC01:k3s:hwlab-v03:hwlab-cloud-api:hwlab-cloud-api download /tmp/runtime-bundle.tar.gz ./runtime-bundle.tar.gz",
|
||||
);
|
||||
expect(scoped.examples.windowsDrive).toContain("D:\\tmp\\trace.json");
|
||||
expect(scoped.examples.windowsDrive).toContain("D:\\tmp\\capture.zip");
|
||||
expect(scoped.examples.generatedTextOverride).toBe(
|
||||
"trans D601:/tmp download --allow-text-transfer /tmp/trace.json ./trace.json",
|
||||
);
|
||||
expect(scoped.examples.host).not.toMatch(/\.(?:json|md|txt|ya?ml)\b/);
|
||||
expect(scoped.examples.k3sWorkload).not.toMatch(/\.(?:json|md|txt|ya?ml)\b/);
|
||||
expect(scoped.examples.windowsDrive).not.toMatch(/\.(?:json|md|txt|ya?ml)\b/);
|
||||
});
|
||||
|
||||
test("renders compact top-level and scoped help without dump fallback", () => {
|
||||
|
||||
Reference in New Issue
Block a user