mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-29 13:01:13 +03:00
Add an error handler unittest for ssh_options_set().
Add an error handler unittest for ssh_options_set with case SSH_OPTIONS_HOST when ssh_config_parse_uri returns error. Signed-off-by: Wenjie Yang <yangw.ing@foxmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
3577eea324
commit
cbabc72555
@ -88,6 +88,8 @@ static void torture_options_set_host(void **state) {
|
||||
|
||||
/* disallow metacharacters in the username */
|
||||
rc = ssh_options_set(session, SSH_OPTIONS_HOST, "shallN()tP4ss -@hostname");
|
||||
assert_string_equal(ssh_get_error(session),
|
||||
"Invalid argument in ssh_options_set");
|
||||
assert_ssh_return_code_equal(session, rc, SSH_ERROR);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user