1
1
libssh/tests/client/torture_sftp_ext.c
Andreas Schneider f0ddde4826 Fix config.h includes
We need stdlib.h and string.h in priv.h for free() and memset().

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-10-28 14:31:37 +02:00

36 строки
623 B
C

#define LIBSSH_STATIC
#include "config.h"
#include "torture.h"
#include "sftp.c"
static void torture_sftp_ext_new(void **state) {
sftp_ext x;
(void) state;
x = sftp_ext_new();
assert_false(x == NULL);
assert_int_equal(x->count, 0);
assert_true(x->name == NULL);
assert_true(x->data == NULL);
sftp_ext_free(x);
}
int torture_run_tests(void) {
int rc;
struct CMUnitTest tests[] = {
cmocka_unit_test(torture_sftp_ext_new),
};
ssh_init();
torture_filter_tests(tests);
rc = cmocka_run_group_tests(tests, NULL, NULL);
ssh_finalize();
return rc;
}