source: tests/check_help.c @ 15c4cd4

Last change on this file since 15c4cd4 was 5ebff60, checked in by dequis <dx@…>, at 2015-02-20T22:50:54Z

Reindent everything to K&R style with tabs

Used uncrustify, with the configuration file in ./doc/uncrustify.cfg

Commit author set to "Indent <please@…>" so that it's easier to
skip while doing git blame.

  • Property mode set to 100644
File size: 699 bytes
Line 
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
9START_TEST(test_help_initfree)
10help_t * h, *r;
11r = help_init(&h, "/dev/null");
12fail_if(r == NULL);
13fail_if(r != h);
14
15help_free(&h);
16fail_if(h != NULL);
17END_TEST
18
19START_TEST(test_help_nonexistent)
20help_t * h, *r;
21r = help_init(&h, "/dev/null");
22fail_unless(help_get(&h, "nonexistent") == NULL);
23fail_if(r == NULL);
24END_TEST
25
26Suite *help_suite(void)
27{
28        Suite *s = suite_create("Help");
29        TCase *tc_core = tcase_create("Core");
30
31        suite_add_tcase(s, tc_core);
32        tcase_add_test(tc_core, test_help_initfree);
33        tcase_add_test(tc_core, test_help_nonexistent);
34        return s;
35}
Note: See TracBrowser for help on using the repository browser.