mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
tests: Fixed the misc torture test.
This commit is contained in:
@@ -107,9 +107,9 @@ START_TEST (torture_path_expand_escape)
|
|||||||
const char *s = "%d/%h/by/%r";
|
const char *s = "%d/%h/by/%r";
|
||||||
char *e;
|
char *e;
|
||||||
|
|
||||||
ssh_options_set(session, SSH_OPTIONS_SSH_DIR, "guru");
|
session->sshdir = strdup("guru");
|
||||||
ssh_options_set(session, SSH_OPTIONS_HOST, "meditation");
|
session->host = strdup("meditation");
|
||||||
ssh_options_set(session, SSH_OPTIONS_USER, "root");
|
session->username = strdup("root");
|
||||||
|
|
||||||
e = ssh_path_expand_escape(session, s);
|
e = ssh_path_expand_escape(session, s);
|
||||||
ck_assert_str_eq(e, "guru/meditation/by/root");
|
ck_assert_str_eq(e, "guru/meditation/by/root");
|
||||||
@@ -121,7 +121,7 @@ START_TEST (torture_path_expand_known_hosts)
|
|||||||
{
|
{
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
|
||||||
ssh_options_set(session, SSH_OPTIONS_SSH_DIR, "/home/guru/.ssh");
|
session->sshdir = strdup("/home/guru/.ssh");
|
||||||
|
|
||||||
tmp = ssh_path_expand_escape(session, "%d/known_hosts");
|
tmp = ssh_path_expand_escape(session, "%d/known_hosts");
|
||||||
ck_assert_str_eq(tmp, "/home/guru/.ssh/known_hosts");
|
ck_assert_str_eq(tmp, "/home/guru/.ssh/known_hosts");
|
||||||
|
|||||||
Reference in New Issue
Block a user