Skip to content

Commit

Permalink
fix exec test expectation for command string
Browse files Browse the repository at this point in the history
  • Loading branch information
levkropp committed Feb 27, 2025
1 parent 46b5823 commit 4a2ddab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_cli_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ TEST_F(Client, execCmdWithDirAndSudoUsesSh)
cmds_string += " " + cmds[i];

REPLACE(ssh_channel_request_exec, ([&dir, &cmds_string](ssh_channel, const char* raw_cmd) {
EXPECT_EQ(raw_cmd, "sudo sh -c cd\\ " + dir + "\\ \\&\\&\\ " + mpu::escape_for_shell(cmds_string));
EXPECT_EQ(raw_cmd, "sudo sh -c cd\\ " + dir + "\\ \\&\\&\\ sudo\\ -u\\ user\\ sudo\\ pwd");

return SSH_OK;
}));
Expand Down

0 comments on commit 4a2ddab

Please sign in to comment.