1
1
libssh/tests/client/torture_sftp_static.c
Aris Adamantiadis d42a1a35b0 tests: allow conditionnal execution on pattern
Option can be used to filter out irrelevant tests
usage: ./torture_pki '*ed25519'

Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-02 17:34:15 +01:00

34 строки
561 B
C

#define LIBSSH_STATIC
#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;
UnitTest tests[] = {
unit_test(torture_sftp_ext_new),
};
ssh_init();
torture_filter_tests(tests);
rc = run_tests(tests);
ssh_finalize();
return rc;
}