mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-19 17:11:42 -06:00
fix-cli-preserve-windows-path-delimiters (#114505)
Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
This commit is contained in:
@@ -471,6 +471,47 @@ describe("cli program (nodes basics)", () => {
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it.each([
|
||||
{
|
||||
platform: "win32",
|
||||
pathEnv: "C:\\one;D:\\two;E:\\three;F:\\four",
|
||||
expectedPath: "path: C:\\one;D:\\two;…;F:\\four",
|
||||
rejectedPath: "path: C:\\one;D:…:\\four",
|
||||
},
|
||||
{
|
||||
platform: "windows",
|
||||
pathEnv: "C:\\one;D:\\two;E:\\three;F:\\four",
|
||||
expectedPath: "path: C:\\one;D:\\two;…;F:\\four",
|
||||
rejectedPath: "path: C:\\one;D:…:\\four",
|
||||
},
|
||||
{
|
||||
platform: "linux",
|
||||
pathEnv: "/one:/two:/three:/four",
|
||||
expectedPath: "path: /one:/two:…:/four",
|
||||
rejectedPath: "path: /one:/two:/three:/four",
|
||||
},
|
||||
])("renders $platform node PATH entries with their platform delimiter", async (fixture) => {
|
||||
callGateway.mockResolvedValue({
|
||||
ts: Date.now(),
|
||||
nodes: [
|
||||
{
|
||||
nodeId: `${fixture.platform}-node`,
|
||||
displayName: `${fixture.platform} node`,
|
||||
platform: fixture.platform,
|
||||
pathEnv: fixture.pathEnv,
|
||||
paired: true,
|
||||
connected: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await runProgram(["nodes", "status"]);
|
||||
|
||||
const output = getRuntimeOutput();
|
||||
expect(output).toContain(fixture.expectedPath);
|
||||
expect(output).not.toContain(fixture.rejectedPath);
|
||||
});
|
||||
|
||||
it("keeps connection age adjacent to connection status before pending approval", async () => {
|
||||
callGateway.mockResolvedValue({
|
||||
ts: Date.now(),
|
||||
|
||||
Reference in New Issue
Block a user