source: tests/check_help.c @ 269580c

Last change on this file since 269580c was 3e16fb8, checked in by Jelmer Vernooij <jelmer@…>, at 2014-04-20T16:59:23Z

Fix compiler warnings in testsuite/.

  • Property mode set to 100644
File size: 710 bytes
RevLine 
[c227706]1#include <stdlib.h>
2#include <glib.h>
3#include <gmodule.h>
4#include <check.h>
5#include <string.h>
6#include <stdio.h>
7#include "help.h"
8
[2d88d25a]9START_TEST(test_help_initfree)
[c227706]10        help_t *h, *r;
11        r = help_init(&h, "/dev/null");
12        fail_if(r == NULL);
13        fail_if(r != h);
[3e16fb8]14
[2d88d25a]15        help_free(&h);
16        fail_if(h != NULL);
[c227706]17END_TEST
18
19START_TEST(test_help_nonexistent)
20        help_t *h, *r;
21        r = help_init(&h, "/dev/null");
22        fail_unless(help_get(&h, "nonexistent") == NULL);
[3e16fb8]23        fail_if(r == NULL);
[c227706]24END_TEST
25
26Suite *help_suite (void)
27{
28        Suite *s = suite_create("Help");
29        TCase *tc_core = tcase_create("Core");
30        suite_add_tcase (s, tc_core);
[2d88d25a]31        tcase_add_test (tc_core, test_help_initfree);
[c227706]32        tcase_add_test (tc_core, test_help_nonexistent);
33        return s;
34}
Note: See TracBrowser for help on using the repository browser.