2010-12-28 20:57:02 +03:00
|
|
|
#define LIBSSH_STATIC
|
|
|
|
|
2017-10-28 15:31:37 +03:00
|
|
|
#include "config.h"
|
|
|
|
|
2010-12-28 20:57:02 +03:00
|
|
|
#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) {
|
2011-01-03 10:46:14 +03:00
|
|
|
int rc;
|
2015-09-07 11:39:51 +03:00
|
|
|
struct CMUnitTest tests[] = {
|
|
|
|
cmocka_unit_test(torture_sftp_ext_new),
|
2010-12-28 20:57:02 +03:00
|
|
|
};
|
|
|
|
|
2011-01-03 11:02:34 +03:00
|
|
|
ssh_init();
|
|
|
|
|
2014-09-02 11:07:17 +04:00
|
|
|
torture_filter_tests(tests);
|
2015-09-07 11:39:51 +03:00
|
|
|
rc = cmocka_run_group_tests(tests, NULL, NULL);
|
2011-01-03 10:46:14 +03:00
|
|
|
ssh_finalize();
|
|
|
|
|
|
|
|
return rc;
|
2010-12-28 20:57:02 +03:00
|
|
|
}
|