torture: Add cases for username checks

Signed-off-by: Norbert Pocs <norbertpocs0@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Norbert Pocs
2023-12-28 12:27:31 +01:00
committed by Jakub Jelen
parent d97a5930c9
commit 2be44b4c5a
2 changed files with 9 additions and 0 deletions

View File

@@ -2377,6 +2377,9 @@ static void torture_config_parse_uri(void **state)
assert_null(username);
assert_string_equal(hostname, "1:2:3::4");
SAFE_FREE(hostname);
rc = ssh_config_parse_uri("user -name@", &username, NULL, NULL, true);
assert_int_equal(rc, SSH_ERROR);
}
int torture_run_tests(void)