~ubuntu-branches/ubuntu/hardy/gengetopt/hardy

« back to all changes in this revision

Viewing changes to tests/test_sections_option_help.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-01-29 14:55:40 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080129145540-bkah1bl330gpelmh
Tags: 2.22-1ubuntu1
* Merge with Debian; remaining changes:
  - Fix build failures with g++-4.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* test_sections_option_help.c test */
 
2
 
 
3
/* test option help fields in the presence of sections */
 
4
 
 
5
#include <stdlib.h>
 
6
#include <stdio.h>
 
7
 
 
8
#include "test_sections_cmd.h"
 
9
 
 
10
#define PRINT_OPTION(s) printf("%s: %s\n", # s, args_info.s)
 
11
 
 
12
static struct gengetopt_args_info args_info;
 
13
 
 
14
int
 
15
main (int argc, char **argv)
 
16
 
17
  test_sections_cmd_parser_init (&args_info);
 
18
 
 
19
  PRINT_OPTION(help_help);
 
20
  PRINT_OPTION(version_help);
 
21
  PRINT_OPTION(string_help);
 
22
  PRINT_OPTION(int_help);
 
23
  PRINT_OPTION(short_help);
 
24
  PRINT_OPTION(long_help);
 
25
  PRINT_OPTION(float_help);
 
26
  PRINT_OPTION(double_help);
 
27
  PRINT_OPTION(longdouble_help);
 
28
  PRINT_OPTION(longlong_help);
 
29
  PRINT_OPTION(flag_help);
 
30
  PRINT_OPTION(function_help);
 
31
  PRINT_OPTION(no_short_help);
 
32
  PRINT_OPTION(required_help);
 
33
 
 
34
  return 0;
 
35
}