From 361e37dc66b374b432f8db29f3169ab00fd0cd03 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 28 Dec 2010 18:57:02 +0100 Subject: tests: Added a torture_sftp_static test. --- tests/client/torture_sftp_static.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/client/torture_sftp_static.c (limited to 'tests/client/torture_sftp_static.c') diff --git a/tests/client/torture_sftp_static.c b/tests/client/torture_sftp_static.c new file mode 100644 index 0000000..c6cd979 --- /dev/null +++ b/tests/client/torture_sftp_static.c @@ -0,0 +1,26 @@ +#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) { + const UnitTest tests[] = { + unit_test(torture_sftp_ext_new), + }; + + return run_tests(tests); +} -- cgit v1.2.3