mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-05 20:55:46 +03:00
tests: Fix the glob test on musl libc
Fixes #150 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -300,16 +300,16 @@ static void torture_config_double_ports(void **state) {
|
|||||||
static void torture_config_glob(void **state) {
|
static void torture_config_glob(void **state) {
|
||||||
ssh_session session = *state;
|
ssh_session session = *state;
|
||||||
int ret;
|
int ret;
|
||||||
#ifdef HAVE_GLOB
|
#if defined(HAVE_GLOB) && defined(HAVE_GLOB_GL_FLAGS_MEMBER)
|
||||||
char *v;
|
char *v;
|
||||||
#endif
|
#endif /* HAVE_GLOB && HAVE_GLOB_GL_FLAGS_MEMBER */
|
||||||
|
|
||||||
ret = ssh_config_parse_file(session, LIBSSH_TESTCONFIG5);
|
ret = ssh_config_parse_file(session, LIBSSH_TESTCONFIG5);
|
||||||
assert_true(ret == 0); /* non-existing files should not error */
|
assert_true(ret == 0); /* non-existing files should not error */
|
||||||
|
|
||||||
/* Test the variable presence */
|
/* Test the variable presence */
|
||||||
|
|
||||||
#ifdef HAVE_GLOB
|
#if defined(HAVE_GLOB) && defined(HAVE_GLOB_GL_FLAGS_MEMBER)
|
||||||
ret = ssh_options_get(session, SSH_OPTIONS_PROXYCOMMAND, &v);
|
ret = ssh_options_get(session, SSH_OPTIONS_PROXYCOMMAND, &v);
|
||||||
assert_true(ret == 0);
|
assert_true(ret == 0);
|
||||||
assert_non_null(v);
|
assert_non_null(v);
|
||||||
@@ -323,7 +323,7 @@ static void torture_config_glob(void **state) {
|
|||||||
|
|
||||||
assert_string_equal(v, ID_FILE);
|
assert_string_equal(v, ID_FILE);
|
||||||
SSH_STRING_FREE_CHAR(v);
|
SSH_STRING_FREE_CHAR(v);
|
||||||
#endif /* HAVE_GLOB */
|
#endif /* HAVE_GLOB && HAVE_GLOB_GL_FLAGS_MEMBER */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user