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

« back to all changes in this revision

Viewing changes to tests/test_groups_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_groups_option_help.c test */
 
2
 
 
3
/* test option help fields in the presence of groups */
 
4
 
 
5
#include <stdlib.h>
 
6
#include <stdio.h>
 
7
 
 
8
#include "test_groups_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_groups_cmd_parser_init (&args_info);
 
18
 
 
19
  PRINT_OPTION(help_help);
 
20
  PRINT_OPTION(version_help);
 
21
  PRINT_OPTION(opta_help);
 
22
  PRINT_OPTION(optA_help);
 
23
  PRINT_OPTION(optAmul_help);
 
24
  PRINT_OPTION(optb_help);
 
25
  PRINT_OPTION(optc_help);
 
26
  PRINT_OPTION(optd_help);
 
27
 
 
28
  test_groups_cmd_parser_free (&args_info);
 
29
 
 
30
  return 0;
 
31
}