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

« back to all changes in this revision

Viewing changes to tests/test.output

  • 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
*** no_strings
 
2
*** no_multi_strings
 
3
*** no_multi_types
 
4
*** no_unamed
 
5
*** no_optgiven.sh
1
6
./no_optgiven: '--foo' ('-i') option required
2
7
the no_optgiven_cmd_parser2 returned successfully
3
8
./no_optgiven2: '--foo' ('-i') option required
4
 
foo option: 10
5
 
bar option: hey
6
 
arg: test1
7
 
arg: test2
8
 
arg: test3
9
 
foo option: 10
10
 
bar option: hey
11
 
arg: test1
12
 
arg: test2
13
 
arg: test3
 
9
*** more_than_once.sh
 
10
foo option: 10
 
11
bar option: hey
 
12
arg: test1
 
13
arg: test2
 
14
arg: test3
 
15
foo option: 10
 
16
bar option: hey
 
17
arg: test1
 
18
arg: test2
 
19
arg: test3
 
20
*** canonize-names
 
21
*** no_prog_name
14
22
specified --required: foo
15
23
additional: unamed
 
24
*** default_values
16
25
foo-opt is given: 0
17
26
bar-opt is given: 0
18
27
Value of foo: 15000
22
31
Value of foofloat: 15000.000000
23
32
Value of foodouble: 15000.000000
24
33
Value of PI:     3.1415926536
 
34
*** default_cmdline
25
35
Value of foo: 15000
26
36
Value of bar: this is a default
 
37
*** test_all_opts.sh
27
38
specified --opt-arg
28
39
specified --opt-arg-short
29
40
specified --opt-arg with argument bar
30
41
specified --opt-arg-short with argument foobar
31
42
specified --hidden: 10
 
43
*** test_all_opts_file_save.sh
32
44
specified --opt-arg
33
45
specified --opt-arg-short
 
46
*** test_groups.sh
34
47
./test_groups: 0 options of group grp1 were given. One is required.
35
48
./test_groups: 2 options of group grp1 were given. One is required.
36
49
./test_groups: 2 options of group my grp2 were given. At most one is required.
43
56
optAmul arg: bar
44
57
optAmul arg: (null)
45
58
optAmul arg: aaa
 
59
*** test_modes.sh
 
60
optA given
 
61
optA given
 
62
./test_modes: option --optd conflicts with option --opta
 
63
./test_modes: option --optd conflicts with option --mopt
 
64
./test_modes: option --opta conflicts with option --mopt
 
65
./test_modes: '--optA' ('-A') option required
 
66
./test_modes: option --optd conflicts with option --mopt
 
67
*** test_conf_parser.sh
46
68
value of required: this is a test
47
69
value of string: another
48
70
value of no-short_given: 1
65
87
opt-arg given: 1
66
88
opt-arg value: not given
67
89
saved configuration file test_conf_parser.save
 
90
*** test_conf_parser_ov.sh
68
91
value of required: bar
69
92
value of string: another
70
93
value of no-short_given: 1
79
102
  value of multi-string: sixth
80
103
value of multi-string-def_given: 0
81
104
default value of multi-string-def: this default
 
105
*** test_conf_parser_ov2.sh
82
106
value of required: bar
83
107
value of string: another
84
108
value of no-short_given: 1
85
109
value of int: 100
86
110
value of float: 2.140000
 
111
*** test_conf_parser_ov3.sh
87
112
value of required: bar
88
113
value of string: another
89
114
value of no-short_given: 1
99
124
  value of multi-string: last?
100
125
value of multi-string-def_given: 0
101
126
default value of multi-string-def: this default
 
127
*** test_conf_parser_ov4.sh
102
128
value of required: this is a test
103
129
value of string: another
104
130
value of no-short_given: 1
105
131
value of int: 100
106
132
value of float: 3.140000
107
133
./test_conf_parser_ov4: `--required' (`-r') option given more than once
 
134
*** test_conf_parser_err.sh
108
135
test_conf_parser: option `--string' requires an argument
 
136
*** test_conf_parser_err_string.sh
109
137
test_conf_parser:./test_conf_err_string.conf:3: malformed string in configuration file
110
138
test_conf_parser:./test_conf_err_string2.conf:3: unterminated string in configuration file
 
139
*** test_conf_parser_grp.sh
111
140
value of required: this is a test
112
141
value of string: another
113
142
value of no-short_given: 1
125
154
noarg_noshort given 0 times
126
155
opt-arg given: 0
127
156
opt-arg value: not given
 
157
*** test_conf_parser_save.sh
128
158
read configuration file: test_conf_parser.save
129
159
value of required: this is a test
130
160
value of string: another
147
177
noarg_noshort given 2 times
148
178
opt-arg given: 1
149
179
opt-arg value: not given
 
180
*** test_multiple.sh
150
181
passed string: \"foo\"
151
182
passed string: bar
152
183
passed string: hello
167
198
optarg argument: no arg given
168
199
optarg argument: first arg for optarg
169
200
optarg argument: second arg for optarg
 
201
longlong_given 3 times
 
202
longlong argument: 1234567890
 
203
longlong argument: 234567890
 
204
longlong argument: 34567890
170
205
optarg_noshort_given 2 times
171
206
optarg_noshort argument: second arg for optarg
172
207
optarg_noshort argument: no arg given
 
208
*** test_multiple_err.sh
173
209
./test_multiple: option requires an argument -- s
174
210
./test_multiple: '--int' ('-i') option required
175
211
./test_multiple: '--limited' ('-L') option occurrences must be 3
177
213
./test_multiple: '--limited-open-right' option occurrences must be at least 3
178
214
./test_multiple: '--int' ('-i') option required
179
215
./test_multiple: '--limited-open-left' option occurrences must be at most 3
 
216
*** test_sections.sh
180
217
test_sections 1.0
181
218
 
182
219
Usage: test_sections [OPTIONS]... [FILES]...
206
243
Last section:
207
244
      --no-short               no short option
208
245
  -r, --required=STRING        required option (mandatory)
 
246
*** test_default_values.sh
209
247
foo-opt is given: 0
210
248
bar-opt is given: 0
211
249
Value of foo: 15000
252
290
Value of foodouble: 15000.000000
253
291
Value of PI:     3.1415926536
254
292
./default_values: invalid numeric value: a5
 
293
*** test_values.sh
255
294
specified --string-values with argument foobar
256
295
specified --string-values with (original) argument foob
257
296
(un)specified --string-values-def with argument bar
275
314
specified --multistring-values-no-short with argument bar
276
315
specified --multistring-values-no-short with argument bar
277
316
specified --multistring-values-no-short with argument foo
 
317
specified --int-values with argument 180
 
318
specified --int-values with (original) argument 1
 
319
specified --int-values-m with argument 1800
 
320
specified --int-values-m with (original) argument 1
 
321
specified --int-values-m with argument 2700
 
322
specified --int-values-m with (original) argument 27
 
323
(un)specified --int-values-def with argument 180
 
324
(un)specified --values-second-enums with argument 1 (180)
 
325
specified --values-multiple-enums with argument 0
 
326
specified --values-multiple-enums with (original) argument FI
 
327
specified --values-multiple-enums with argument 1
 
328
specified --values-multiple-enums with (original) argument S
 
329
specified --values-multiple-enums with argument 2
 
330
specified --values-multiple-enums with (original) argument T
 
331
specified --values-multiple-enums with argument 3
 
332
specified --values-multiple-enums with (original) argument FOURTH
 
333
saved configuration file test_values.save
 
334
*** test_values_err.sh
278
335
./test_values: ambiguous argument, "fo", for option `--string-values' (`-s')
279
336
./test_values: invalid argument, "fooa", for option `--multistring-values' (`-S')
280
337
./test_values: invalid argument, "fooa", for option `--string-values-no-short'
281
338
./test_values: invalid argument, "fooa", for option `--multistring-values-no-short'
 
339
*** test_dep.sh
282
340
./test_all_opts: '--dependant' ('-A') option depends on option 'opt-arg'
283
341
specified --opt-arg with argument bar
 
342
*** test_manual_help.sh
 
343
specified --height 100
 
344
      --height=INT     this is the description of height
 
345
test_manual_help 1.0
 
346
 
 
347
Usage: test_manual_help [OPTIONS]... [FILES]...
 
348
 
 
349
  -h, --help           show help (possibly of other options)
 
350
  -?, --detailed-help  show detailed help
 
351
  -V, --version        show version of the program
 
352
      --height=INT     this is the description of height
 
353
  These are the details of option height
 
354
      --vavoom=STRING  this is the description of vavoom
 
355
specified --height 100
 
356
specified --height 100
 
357
      --height=INT     this is the description of height
 
358
specified --vavoom foo
 
359
      --vavoom=STRING  this is the description of vavoom
 
360
test_manual_help 1.0
 
361
specified --height 100
 
362
*** test_multiple_parsers.sh
284
363
second cmdline: -a20 -b10 --my-multi=a,b,c,d,e,f
285
364
  --option-a: 20
286
365
  --option-b: 10
301
380
first cmdline: -M500 -M600
302
381
  --multi: 500
303
382
  --multi: 600
 
383
*** test_sections_option_help
 
384
help_help:   -h, --help                   Print help and exit
 
385
version_help:   -V, --version                Print version and exit
 
386
string_help:   -s, --string=STRING          string option
 
387
int_help:   -i, --int=INT                int option
 
388
short_help:   -S, --short=SHORT            short option
 
389
long_help:   -l, --long=LONG              long option
 
390
float_help:   -f, --float=FLOAT            float option
 
391
double_help:   -d, --double=DOUBLE          double option
 
392
longdouble_help:   -D, --longdouble=LONGDOUBLE  longdouble option
 
393
longlong_help:   -L, --longlong=LONGLONG      longlong option
 
394
flag_help:   -F, --flag                   flag option  (default=on)
 
395
function_help:   -u, --function               function option
 
396
no_short_help:       --no-short               no short option
 
397
required_help:   -r, --required=STRING        required option (mandatory)
 
398
*** test_all_opts_option_help
 
399
help_help:   -h, --help                    Print help and exit
 
400
full_help_help:       --full-help               Print help, including hidden options, and exit
 
401
version_help:   -V, --version                 Print version and exit
 
402
string_help:   -s, --string=STRING            string option
 
403
int_help:   -i, --int=INT                 int option
 
404
short_help:   -S, --short=SHORT             short option
 
405
long_help:   -l, --long=LONG               long option
 
406
float_help:   -f, --float=FLOAT             float option
 
407
double_help:   -d, --double=DOUBLE           double option
 
408
longdouble_help:   -D, --longdouble=LONGDOUBLE   longdouble option
 
409
longlong_help:   -L, --longlong=LONGLONG       longlong option
 
410
flag_help:   -F, --flag                    flag option  (default=on)
 
411
function_help:   -u, --function                function option
 
412
no_short_help:       --no-short                no short option
 
413
opt_arg_help:       --opt-arg[=STRING]        option with optional arg
 
414
opt_arg_short_help:   -o, --opt-arg-short[=STRING]  option with optional arg (short)
 
415
required_help:   -r, --required=STRING         required option (mandatory)
 
416
hidden_help:   -H, --hidden=INT              hidden option
 
417
dependant_help:   -A, --dependant=STRING        option that depends on opt-arg
 
418
very_very_long_option_help:       --very-very-long-option=STRING
 
419
                                the name of this option is long enough to make 
 
420
                                  this description begin on a new line
 
421
assume_multimeth_virtual_help:   -y, --assume-multimeth-virtual
 
422
                                the name of this option is just as long as the 
 
423
                                  maximum allowed, so this description begin on 
 
424
                                  a new line
 
425
file_save_help:       --file-save=STRING        save the passed options into a file
 
426
*** test_groups_option_help
 
427
help_help:   -h, --help              Print help and exit
 
428
version_help:   -V, --version           Print version and exit
 
429
opta_help:   -a, --opta              string a
 
430
optA_help:   -A, --optA[=STRING]     string A
 
431
optAmul_help:   -M, --optAmul[=STRING]  string M
 
432
optb_help:   -b, --optb              string b
 
433
optc_help:       --optc              string c
 
434
optd_help:   -d, --optd              string d
 
435
*** test_modes_option_help
 
436
help_help:   -h, --help              Print help and exit
 
437
version_help:   -V, --version           Print version and exit
 
438
opta_help:   -a, --opta              string a
 
439
optA_help:   -A, --optA[=STRING]     string A (mandatory)
 
440
optAmul_help:   -M, --optAmul[=STRING]  string M
 
441
optb_help:   -b, --optb              string b
 
442
optc_help:       --optc              string c
 
443
optd_help:   -d, --optd              string d (mandatory)
 
444
mopt_help:   -m, --mopt=INT          option of my mode
 
445
*** test_no_options
 
446
*** test_show_help.sh
304
447
test_all_opts 1.0
305
448
 
306
449
This is just a gengetopt's test file
316
459
 
317
460
 
318
461
  -h, --help                    Print help and exit
 
462
      --detailed-help           Print help, including all details and hidden 
 
463
                                  options, and exit
319
464
      --full-help               Print help, including hidden options, and exit
320
465
  -V, --version                 Print version and exit
321
466
 
400
545
      --string-values-group=FOO group string option with values and default  
401
546
                                  (possible values="foo", "bar", 
402
547
                                  "foobar", "barfoo" default=`bar')
 
548
  -i, --int-values=INT          int option with values  (possible 
 
549
                                  values="90", "180", "270", "360")
 
550
  -I, --int-values-m=INT        multiple int option with values  (possible 
 
551
                                  values="900", "1800", "2700", "3600")
 
552
      --int-values-def=INT      int option with values and default  (possible 
 
553
                                  values="90", "180", "270", "360" 
 
554
                                  default=`180')
 
555
  -e, --values-first-enums=ENUM option with values and enums 1  (possible 
 
556
                                  values="FOO", "BAR", "ANOTHER", 
 
557
                                  "SOMETHING")
 
558
      --values-second-enums=ENUM
 
559
                                option with values and enums 2 with default  
 
560
                                  (possible values="90", "180", "270", 
 
561
                                  "360" default=`180')
 
562
  -W, --values-multiple-enums=ENUM
 
563
                                multiple option with values and enums  
 
564
                                  (possible values="FIRST", "SECOND", 
 
565
                                  "THIRD", "FOURTH" default=`FOURTH')
 
566
      --file-save=STRING        save the passed options into a file
 
567
*** test_err.sh
 
568
diff wrong_default.err.out ./wrong_default.err
403
569
diff wrong_dep.err.out ./wrong_dep.err
 
570
diff wrong_enum_use.err.out ./wrong_enum_use.err
404
571
diff wrong_flag.err.out ./wrong_flag.err
405
572
diff wrong_flag2.err.out ./wrong_flag2.err
406
573
diff wrong_group.err.out ./wrong_group.err
407
574
diff wrong_group2.err.out ./wrong_group2.err
408
 
diff wrong_type.err.out ./wrong_type.err
 
575
diff wrong_help_redef.err.out ./wrong_help_redef.err
 
576
diff wrong_numeric_value.err.out ./wrong_numeric_value.err
 
577
diff wrong_version_redef.err.out ./wrong_version_redef.err
 
578
*** no_strings -h
409
579
no_strings 1.0
410
580
 
411
581
Usage: no_strings [--foo|-i] <additional files>
413
583
  -h, --help     Print help and exit
414
584
  -V, --version  Print version and exit
415
585
  -i, --foo=INT  foo option
 
586
*** no_multi_strings -h
416
587
no multi strings 0.1
417
588
 
418
589
Has multiple options none of which are strings
423
594
  -V, --version            Print version and exit
424
595
  -t, --test=A test value  This is a test option  (default=`5')
425
596
      --multi=Multivalue   This is a multi option
 
597
*** no_multi_types -h
 
598
no multi types 0.1
 
599
 
 
600
Has multiple options none of which has type
 
601
 
 
602
Usage: no multi types [OPTIONS]... [FILES]...
 
603
 
 
604
  -h, --help               Print help and exit
 
605
  -V, --version            Print version and exit
 
606
  -t, --test=A test value  This is a test option  (default=`5')
 
607
      --multi              This is a multi option with no type
 
608
*** no_unamed -h
426
609
no_unamed 1.0
427
610
 
428
611
Usage: no_unamed [OPTIONS]...
430
613
  -h, --help        Print help and exit
431
614
  -V, --version     Print version and exit
432
615
  -i, --foo=STRING  foo string option
433
 
no_optgiven 1.0
434
 
 
435
 
Usage: no_optgiven [OPTIONS]... [FILES]...
436
 
 
437
 
  -h, --help     Print help and exit
438
 
  -V, --version  Print version and exit
439
 
  -i, --foo=INT  foo option
440
 
no_optgiven 1.0
441
 
 
442
 
Usage: no_optgiven [OPTIONS]... [FILES]...
443
 
 
444
 
  -h, --help     Print help and exit
445
 
  -V, --version  Print version and exit
446
 
  -i, --foo=INT  foo option
 
616
*** no_optgiven -h
 
617
no_optgiven 1.0
 
618
 
 
619
Usage: no_optgiven [OPTIONS]... [FILES]...
 
620
 
 
621
  -h, --help     Print help and exit
 
622
  -V, --version  Print version and exit
 
623
  -i, --foo=INT  foo option
 
624
*** no_optgiven2 -h
 
625
no_optgiven 1.0
 
626
 
 
627
Usage: no_optgiven [OPTIONS]... [FILES]...
 
628
 
 
629
  -h, --help     Print help and exit
 
630
  -V, --version  Print version and exit
 
631
  -i, --foo=INT  foo option
 
632
*** more_than_once -h
447
633
more_than_once 1.0
448
634
 
449
635
Usage: more_than_once [OPTIONS]... [FILES]...
452
638
  -V, --version     Print version and exit
453
639
  -f, --foo=INT     foo option
454
640
  -b, --bar=STRING  bar option
 
641
*** no_prog_name -h
455
642
specified --required: foo
456
643
additional: unamed
 
644
*** canonize-names -h
457
645
canonize_names 1.0
458
646
 
459
647
Usage: canonize_names [OPTIONS]...
461
649
  -h, --help     Print help and exit
462
650
  -V, --version  Print version and exit
463
651
  -i, --foo=INT  foo option
 
652
*** default_values -h
464
653
default_values 1.0
465
654
 
466
655
Usage: default_values [OPTIONS]... [FILES]...
478
667
  -s, --timeout=123456789012  number of seconds after the scanning is cancelled 
479
668
                                if no progress is shown at all.  
480
669
                                (default=`120')
 
670
*** default_cmdline -h
481
671
gengetopt 1.0
482
672
 
483
673
Usage: gengetopt [OPTIONS]...
486
676
  -V, --version     Print version and exit
487
677
  -f, --foo=INT     foo option  (default=`15000')
488
678
  -b, --bar=STRING  bar option  (default=`this is a default')
 
679
*** test_all_opts -h
489
680
test_all_opts 1.0
490
681
 
491
682
This is just a gengetopt's test file
500
691
In ggo files comments start with # and end at EOL
501
692
 
502
693
  -h, --help                    Print help and exit
 
694
      --detailed-help           Print help, including all details and hidden 
 
695
                                  options, and exit
503
696
      --full-help               Print help, including hidden options, and exit
504
697
  -V, --version                 Print version and exit
505
698
 
542
735
      --file-save=STRING        save the passed options into a file
543
736
 
544
737
A text after all options.
 
738
*** test_groups -h
545
739
test_groups 1.0
546
740
 
547
741
Usage: test_groups [OPTIONS]... [FILES]...
563
757
 Group: my grp2
564
758
      --optc              string c
565
759
  -d, --optd              string d
566
 
test_conf_parser 1.0
567
 
 
568
 
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
569
 
 
570
 
  -h, --help                    Print help and exit
571
 
  -V, --version                 Print version and exit
572
 
 
573
 
 Group: grp1
574
 
  an option of this group is required
575
 
  -a, --opta=STRING             string a
576
 
  -b, --optb=STRING             string b
577
 
 
578
 
 Group: my grp2
579
 
      --optc                    string c
580
 
  -C, --optd                    string d
581
 
  -s, --string=STRING           string option
582
 
  -i, --int=INT                 int option
583
 
  -S, --short=SHORT             short option
584
 
  -l, --long=LONG               long option
585
 
  -f, --float=FLOAT             float option
586
 
  -d, --double=DOUBLE           double option
587
 
  -D, --longdouble=LONGDOUBLE   longdouble option
588
 
  -L, --longlong=LONGLONG       longlong option
589
 
  -F, --flag                    flag option  (default=on)
590
 
  -u, --function                function option
591
 
      --no-short                no short option
592
 
  -r, --required=STRING         required option
593
 
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
594
 
  -M, --multi-string=STRING     multiple string option
595
 
      --multi-string-def=STRING multiple string option with default  
596
 
                                  (default=`this default')
597
 
  -n, --noarg                   multiple option with no arg
598
 
      --noarg-noshort           multiple option with no arg and no short
599
 
      --opt-arg[=STRING]        option with optional arg
600
 
      --file-save=STRING        save the passed options into a file
601
 
test_conf_parser 1.0
602
 
 
603
 
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
604
 
 
605
 
  -h, --help                    Print help and exit
606
 
  -V, --version                 Print version and exit
607
 
 
608
 
 Group: grp1
609
 
  an option of this group is required
610
 
  -a, --opta=STRING             string a
611
 
  -b, --optb=STRING             string b
612
 
 
613
 
 Group: my grp2
614
 
      --optc                    string c
615
 
  -C, --optd                    string d
616
 
  -s, --string=STRING           string option
617
 
  -i, --int=INT                 int option
618
 
  -S, --short=SHORT             short option
619
 
  -l, --long=LONG               long option
620
 
  -f, --float=FLOAT             float option
621
 
  -d, --double=DOUBLE           double option
622
 
  -D, --longdouble=LONGDOUBLE   longdouble option
623
 
  -L, --longlong=LONGLONG       longlong option
624
 
  -F, --flag                    flag option  (default=on)
625
 
  -u, --function                function option
626
 
      --no-short                no short option
627
 
  -r, --required=STRING         required option
628
 
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
629
 
  -M, --multi-string=STRING     multiple string option
630
 
      --multi-string-def=STRING multiple string option with default  
631
 
                                  (default=`this default')
632
 
  -n, --noarg                   multiple option with no arg
633
 
      --noarg-noshort           multiple option with no arg and no short
634
 
      --opt-arg[=STRING]        option with optional arg
635
 
      --file-save=STRING        save the passed options into a file
636
 
test_conf_parser 1.0
637
 
 
638
 
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
639
 
 
640
 
  -h, --help                    Print help and exit
641
 
  -V, --version                 Print version and exit
642
 
 
643
 
 Group: grp1
644
 
  an option of this group is required
645
 
  -a, --opta=STRING             string a
646
 
  -b, --optb=STRING             string b
647
 
 
648
 
 Group: my grp2
649
 
      --optc                    string c
650
 
  -C, --optd                    string d
651
 
  -s, --string=STRING           string option
652
 
  -i, --int=INT                 int option
653
 
  -S, --short=SHORT             short option
654
 
  -l, --long=LONG               long option
655
 
  -f, --float=FLOAT             float option
656
 
  -d, --double=DOUBLE           double option
657
 
  -D, --longdouble=LONGDOUBLE   longdouble option
658
 
  -L, --longlong=LONGLONG       longlong option
659
 
  -F, --flag                    flag option  (default=on)
660
 
  -u, --function                function option
661
 
      --no-short                no short option
662
 
  -r, --required=STRING         required option
663
 
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
664
 
  -M, --multi-string=STRING     multiple string option
665
 
      --multi-string-def=STRING multiple string option with default  
666
 
                                  (default=`this default')
667
 
  -n, --noarg                   multiple option with no arg
668
 
      --noarg-noshort           multiple option with no arg and no short
669
 
      --opt-arg[=STRING]        option with optional arg
670
 
      --file-save=STRING        save the passed options into a file
671
 
test_conf_parser 1.0
672
 
 
673
 
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
674
 
 
675
 
  -h, --help                    Print help and exit
676
 
  -V, --version                 Print version and exit
677
 
 
678
 
 Group: grp1
679
 
  an option of this group is required
680
 
  -a, --opta=STRING             string a
681
 
  -b, --optb=STRING             string b
682
 
 
683
 
 Group: my grp2
684
 
      --optc                    string c
685
 
  -C, --optd                    string d
686
 
  -s, --string=STRING           string option
687
 
  -i, --int=INT                 int option
688
 
  -S, --short=SHORT             short option
689
 
  -l, --long=LONG               long option
690
 
  -f, --float=FLOAT             float option
691
 
  -d, --double=DOUBLE           double option
692
 
  -D, --longdouble=LONGDOUBLE   longdouble option
693
 
  -L, --longlong=LONGLONG       longlong option
694
 
  -F, --flag                    flag option  (default=on)
695
 
  -u, --function                function option
696
 
      --no-short                no short option
697
 
  -r, --required=STRING         required option
698
 
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
699
 
  -M, --multi-string=STRING     multiple string option
700
 
      --multi-string-def=STRING multiple string option with default  
701
 
                                  (default=`this default')
702
 
  -n, --noarg                   multiple option with no arg
703
 
      --noarg-noshort           multiple option with no arg and no short
704
 
      --opt-arg[=STRING]        option with optional arg
705
 
      --file-save=STRING        save the passed options into a file
706
 
test_conf_parser 1.0
707
 
 
708
 
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
709
 
 
710
 
  -h, --help                    Print help and exit
711
 
  -V, --version                 Print version and exit
712
 
 
713
 
 Group: grp1
714
 
  an option of this group is required
715
 
  -a, --opta=STRING             string a
716
 
  -b, --optb=STRING             string b
717
 
 
718
 
 Group: my grp2
719
 
      --optc                    string c
720
 
  -C, --optd                    string d
721
 
  -s, --string=STRING           string option
722
 
  -i, --int=INT                 int option
723
 
  -S, --short=SHORT             short option
724
 
  -l, --long=LONG               long option
725
 
  -f, --float=FLOAT             float option
726
 
  -d, --double=DOUBLE           double option
727
 
  -D, --longdouble=LONGDOUBLE   longdouble option
728
 
  -L, --longlong=LONGLONG       longlong option
729
 
  -F, --flag                    flag option  (default=on)
730
 
  -u, --function                function option
731
 
      --no-short                no short option
732
 
  -r, --required=STRING         required option
733
 
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
734
 
  -M, --multi-string=STRING     multiple string option
735
 
      --multi-string-def=STRING multiple string option with default  
736
 
                                  (default=`this default')
737
 
  -n, --noarg                   multiple option with no arg
738
 
      --noarg-noshort           multiple option with no arg and no short
739
 
      --opt-arg[=STRING]        option with optional arg
740
 
      --file-save=STRING        save the passed options into a file
741
 
test_conf_parser 1.0
742
 
 
743
 
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
744
 
 
745
 
  -h, --help                    Print help and exit
746
 
  -V, --version                 Print version and exit
747
 
 
748
 
 Group: grp1
749
 
  an option of this group is required
750
 
  -a, --opta=STRING             string a
751
 
  -b, --optb=STRING             string b
752
 
 
753
 
 Group: my grp2
754
 
      --optc                    string c
755
 
  -C, --optd                    string d
756
 
  -s, --string=STRING           string option
757
 
  -i, --int=INT                 int option
758
 
  -S, --short=SHORT             short option
759
 
  -l, --long=LONG               long option
760
 
  -f, --float=FLOAT             float option
761
 
  -d, --double=DOUBLE           double option
762
 
  -D, --longdouble=LONGDOUBLE   longdouble option
763
 
  -L, --longlong=LONGLONG       longlong option
764
 
  -F, --flag                    flag option  (default=on)
765
 
  -u, --function                function option
766
 
      --no-short                no short option
767
 
  -r, --required=STRING         required option
768
 
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
769
 
  -M, --multi-string=STRING     multiple string option
770
 
      --multi-string-def=STRING multiple string option with default  
771
 
                                  (default=`this default')
772
 
  -n, --noarg                   multiple option with no arg
773
 
      --noarg-noshort           multiple option with no arg and no short
774
 
      --opt-arg[=STRING]        option with optional arg
775
 
      --file-save=STRING        save the passed options into a file
 
760
*** test_modes -h
 
761
test_modes 1.0
 
762
 
 
763
Usage: test_modes [OPTIONS]... [FILES]...
 
764
 
 
765
  -h, --help              Print help and exit
 
766
  -V, --version           Print version and exit
 
767
 
 
768
some non mode options:
 
769
  -N, --no-mode           a generic option not beloging to any mode
 
770
      --no-mode2=STRING   another generic option not beloging to any mode
 
771
 
 
772
some modes just for testing:
 
773
 
 
774
 Mode: mode1
 
775
  any option of this mode is in contrast with any option of the other mode
 
776
  Notice that this description is quite long so it may spawn many lines...      
 
777
          fortunately gengetopt will wrap it for you :-)
 
778
  -a, --opta              string a
 
779
  -A, --optA[=STRING]     string A (mandatory)
 
780
  -M, --optAmul[=STRING]  string M
 
781
  -b, --optb              string b
 
782
 
 
783
 Mode: mode 2
 
784
      --optc              string c
 
785
  -d, --optd              string d (mandatory)
 
786
 
 
787
 Mode: my mode
 
788
  -m, --mopt=INT          option of my mode
 
789
*** test_conf_parser -h
 
790
test_conf_parser 1.0
 
791
 
 
792
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
 
793
 
 
794
  -h, --help                    Print help and exit
 
795
  -V, --version                 Print version and exit
 
796
 
 
797
 Group: grp1
 
798
  an option of this group is required
 
799
  -a, --opta=STRING             string a
 
800
  -b, --optb=STRING             string b
 
801
 
 
802
 Group: my grp2
 
803
      --optc                    string c
 
804
  -C, --optd                    string d
 
805
  -s, --string=STRING           string option
 
806
  -i, --int=INT                 int option
 
807
  -S, --short=SHORT             short option
 
808
  -l, --long=LONG               long option
 
809
  -f, --float=FLOAT             float option
 
810
  -d, --double=DOUBLE           double option
 
811
  -D, --longdouble=LONGDOUBLE   longdouble option
 
812
  -L, --longlong=LONGLONG       longlong option
 
813
  -F, --flag                    flag option  (default=on)
 
814
  -u, --function                function option
 
815
      --no-short                no short option
 
816
  -r, --required=STRING         required option
 
817
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
 
818
  -M, --multi-string=STRING     multiple string option
 
819
      --multi-string-def=STRING multiple string option with default  
 
820
                                  (default=`this default')
 
821
  -n, --noarg                   multiple option with no arg
 
822
      --noarg-noshort           multiple option with no arg and no short
 
823
      --opt-arg[=STRING]        option with optional arg
 
824
      --file-save=STRING        save the passed options into a file
 
825
*** test_conf_parser_ov -h
 
826
test_conf_parser 1.0
 
827
 
 
828
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
 
829
 
 
830
  -h, --help                    Print help and exit
 
831
  -V, --version                 Print version and exit
 
832
 
 
833
 Group: grp1
 
834
  an option of this group is required
 
835
  -a, --opta=STRING             string a
 
836
  -b, --optb=STRING             string b
 
837
 
 
838
 Group: my grp2
 
839
      --optc                    string c
 
840
  -C, --optd                    string d
 
841
  -s, --string=STRING           string option
 
842
  -i, --int=INT                 int option
 
843
  -S, --short=SHORT             short option
 
844
  -l, --long=LONG               long option
 
845
  -f, --float=FLOAT             float option
 
846
  -d, --double=DOUBLE           double option
 
847
  -D, --longdouble=LONGDOUBLE   longdouble option
 
848
  -L, --longlong=LONGLONG       longlong option
 
849
  -F, --flag                    flag option  (default=on)
 
850
  -u, --function                function option
 
851
      --no-short                no short option
 
852
  -r, --required=STRING         required option
 
853
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
 
854
  -M, --multi-string=STRING     multiple string option
 
855
      --multi-string-def=STRING multiple string option with default  
 
856
                                  (default=`this default')
 
857
  -n, --noarg                   multiple option with no arg
 
858
      --noarg-noshort           multiple option with no arg and no short
 
859
      --opt-arg[=STRING]        option with optional arg
 
860
      --file-save=STRING        save the passed options into a file
 
861
*** test_conf_parser_ov2 -h
 
862
test_conf_parser 1.0
 
863
 
 
864
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
 
865
 
 
866
  -h, --help                    Print help and exit
 
867
  -V, --version                 Print version and exit
 
868
 
 
869
 Group: grp1
 
870
  an option of this group is required
 
871
  -a, --opta=STRING             string a
 
872
  -b, --optb=STRING             string b
 
873
 
 
874
 Group: my grp2
 
875
      --optc                    string c
 
876
  -C, --optd                    string d
 
877
  -s, --string=STRING           string option
 
878
  -i, --int=INT                 int option
 
879
  -S, --short=SHORT             short option
 
880
  -l, --long=LONG               long option
 
881
  -f, --float=FLOAT             float option
 
882
  -d, --double=DOUBLE           double option
 
883
  -D, --longdouble=LONGDOUBLE   longdouble option
 
884
  -L, --longlong=LONGLONG       longlong option
 
885
  -F, --flag                    flag option  (default=on)
 
886
  -u, --function                function option
 
887
      --no-short                no short option
 
888
  -r, --required=STRING         required option
 
889
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
 
890
  -M, --multi-string=STRING     multiple string option
 
891
      --multi-string-def=STRING multiple string option with default  
 
892
                                  (default=`this default')
 
893
  -n, --noarg                   multiple option with no arg
 
894
      --noarg-noshort           multiple option with no arg and no short
 
895
      --opt-arg[=STRING]        option with optional arg
 
896
      --file-save=STRING        save the passed options into a file
 
897
*** test_conf_parser_ov3 -h
 
898
test_conf_parser 1.0
 
899
 
 
900
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
 
901
 
 
902
  -h, --help                    Print help and exit
 
903
  -V, --version                 Print version and exit
 
904
 
 
905
 Group: grp1
 
906
  an option of this group is required
 
907
  -a, --opta=STRING             string a
 
908
  -b, --optb=STRING             string b
 
909
 
 
910
 Group: my grp2
 
911
      --optc                    string c
 
912
  -C, --optd                    string d
 
913
  -s, --string=STRING           string option
 
914
  -i, --int=INT                 int option
 
915
  -S, --short=SHORT             short option
 
916
  -l, --long=LONG               long option
 
917
  -f, --float=FLOAT             float option
 
918
  -d, --double=DOUBLE           double option
 
919
  -D, --longdouble=LONGDOUBLE   longdouble option
 
920
  -L, --longlong=LONGLONG       longlong option
 
921
  -F, --flag                    flag option  (default=on)
 
922
  -u, --function                function option
 
923
      --no-short                no short option
 
924
  -r, --required=STRING         required option
 
925
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
 
926
  -M, --multi-string=STRING     multiple string option
 
927
      --multi-string-def=STRING multiple string option with default  
 
928
                                  (default=`this default')
 
929
  -n, --noarg                   multiple option with no arg
 
930
      --noarg-noshort           multiple option with no arg and no short
 
931
      --opt-arg[=STRING]        option with optional arg
 
932
      --file-save=STRING        save the passed options into a file
 
933
*** test_conf_parser_ov4 -h
 
934
test_conf_parser 1.0
 
935
 
 
936
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
 
937
 
 
938
  -h, --help                    Print help and exit
 
939
  -V, --version                 Print version and exit
 
940
 
 
941
 Group: grp1
 
942
  an option of this group is required
 
943
  -a, --opta=STRING             string a
 
944
  -b, --optb=STRING             string b
 
945
 
 
946
 Group: my grp2
 
947
      --optc                    string c
 
948
  -C, --optd                    string d
 
949
  -s, --string=STRING           string option
 
950
  -i, --int=INT                 int option
 
951
  -S, --short=SHORT             short option
 
952
  -l, --long=LONG               long option
 
953
  -f, --float=FLOAT             float option
 
954
  -d, --double=DOUBLE           double option
 
955
  -D, --longdouble=LONGDOUBLE   longdouble option
 
956
  -L, --longlong=LONGLONG       longlong option
 
957
  -F, --flag                    flag option  (default=on)
 
958
  -u, --function                function option
 
959
      --no-short                no short option
 
960
  -r, --required=STRING         required option
 
961
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
 
962
  -M, --multi-string=STRING     multiple string option
 
963
      --multi-string-def=STRING multiple string option with default  
 
964
                                  (default=`this default')
 
965
  -n, --noarg                   multiple option with no arg
 
966
      --noarg-noshort           multiple option with no arg and no short
 
967
      --opt-arg[=STRING]        option with optional arg
 
968
      --file-save=STRING        save the passed options into a file
 
969
*** test_conf_parser_file_save -h
 
970
test_conf_parser 1.0
 
971
 
 
972
Usage: test_conf_parser [OPTIONS]... [OTHER NAMES]...
 
973
 
 
974
  -h, --help                    Print help and exit
 
975
  -V, --version                 Print version and exit
 
976
 
 
977
 Group: grp1
 
978
  an option of this group is required
 
979
  -a, --opta=STRING             string a
 
980
  -b, --optb=STRING             string b
 
981
 
 
982
 Group: my grp2
 
983
      --optc                    string c
 
984
  -C, --optd                    string d
 
985
  -s, --string=STRING           string option
 
986
  -i, --int=INT                 int option
 
987
  -S, --short=SHORT             short option
 
988
  -l, --long=LONG               long option
 
989
  -f, --float=FLOAT             float option
 
990
  -d, --double=DOUBLE           double option
 
991
  -D, --longdouble=LONGDOUBLE   longdouble option
 
992
  -L, --longlong=LONGLONG       longlong option
 
993
  -F, --flag                    flag option  (default=on)
 
994
  -u, --function                function option
 
995
      --no-short                no short option
 
996
  -r, --required=STRING         required option
 
997
  -c, --conf-file=STRING        config file  (default=`test_conf.conf')
 
998
  -M, --multi-string=STRING     multiple string option
 
999
      --multi-string-def=STRING multiple string option with default  
 
1000
                                  (default=`this default')
 
1001
  -n, --noarg                   multiple option with no arg
 
1002
      --noarg-noshort           multiple option with no arg and no short
 
1003
      --opt-arg[=STRING]        option with optional arg
 
1004
      --file-save=STRING        save the passed options into a file
 
1005
*** test_multiple -h
776
1006
test_multiple 1.0
777
1007
 
778
1008
Usage: test_multiple [OPTIONS]... [FILES]...
783
1013
  -i, --int=INT                 int option (mandatory)
784
1014
  -S, --short=SHORT             short option
785
1015
  -l, --long=LONG               long option
 
1016
      --longlong=LONGLONG       long long option
786
1017
  -L, --limited=STRING          limited multiple option
787
1018
      --limited-interval=STRING limited multiple option (with interval)
788
1019
      --big-limited-interval=STRING
800
1031
  -M, --optarg[=ID]             multi with optional args
801
1032
      --optarg-noshort[=ID]     multi with optional args and no short
802
1033
      --file-save=STRING        save the passed options into a file
 
1034
*** test_sections -h
803
1035
test_sections 1.0
804
1036
 
805
1037
Usage: test_sections [OPTIONS]... [FILES]...
829
1061
Last section:
830
1062
      --no-short               no short option
831
1063
  -r, --required=STRING        required option (mandatory)
 
1064
*** test_values -h
832
1065
test_values 1.0
833
1066
 
834
1067
This is just a test file
870
1103
      --string-values-group=FOO group string option with values and default  
871
1104
                                  (possible values="foo", "bar", 
872
1105
                                  "foobar", "barfoo" default=`bar')
 
1106
  -i, --int-values=INT          int option with values  (possible 
 
1107
                                  values="90", "180", "270", "360")
 
1108
  -I, --int-values-m=INT        multiple int option with values  (possible 
 
1109
                                  values="900", "1800", "2700", "3600")
 
1110
      --int-values-def=INT      int option with values and default  (possible 
 
1111
                                  values="90", "180", "270", "360" 
 
1112
                                  default=`180')
 
1113
  -e, --values-first-enums=ENUM option with values and enums 1  (possible 
 
1114
                                  values="FOO", "BAR", "ANOTHER", 
 
1115
                                  "SOMETHING")
 
1116
      --values-second-enums=ENUM
 
1117
                                option with values and enums 2 with default  
 
1118
                                  (possible values="90", "180", "270", 
 
1119
                                  "360" default=`180')
 
1120
  -W, --values-multiple-enums=ENUM
 
1121
                                multiple option with values and enums  
 
1122
                                  (possible values="FIRST", "SECOND", 
 
1123
                                  "THIRD", "FOURTH" default=`FOURTH')
 
1124
      --file-save=STRING        save the passed options into a file
 
1125
*** test_redef_help -h
873
1126
specified --height
 
1127
*** test_manual_help -h
 
1128
test_manual_help 1.0
 
1129
 
 
1130
Usage: test_manual_help [OPTIONS]... [FILES]...
 
1131
 
 
1132
  -h, --help           show help (possibly of other options)
 
1133
  -?, --detailed-help  show detailed help
 
1134
  -V, --version        show version of the program
 
1135
      --height=INT     this is the description of height
 
1136
      --vavoom=STRING  this is the description of vavoom
 
1137
*** test_no_handle_help -h
 
1138
####################
 
1139
# HEADER
 
1140
####################
 
1141
test_no_handle_help 1.0
 
1142
 
 
1143
Usage: test_no_handle_help [OPTIONS]... [FILES]...
 
1144
 
 
1145
  -h, --help           Print help and exit
 
1146
      --detailed-help  Print help, including all details and hidden options, 
 
1147
                         and exit
 
1148
  -V, --version        Print version and exit
 
1149
      --height=INT     this is the description of height
 
1150
      --vavoom=STRING  this is the description of vavoom
 
1151
####################
 
1152
# FOOTER
 
1153
####################
 
1154
*** test_multiple_parsers -h
874
1155
gengetopt 1.0
875
1156
 
876
1157
Usage: gengetopt [OPTIONS]... [FILES]...
880
1161
  -F, --first-cmd=first command the first command line to parse (mandatory)
881
1162
  -S, --second-cmd=second command
882
1163
                                the second command line to parse (mandatory)
883
 
test_all_opts 1.0
884
 
 
885
 
This is just a gengetopt's test file
886
 
 
887
 
Usage: test_all_opts [OPTIONS]... [FILES]...
888
 
 
889
 
This is just a test file
890
 
 
891
 
to test all possible
892
 
command line type options.
893
 
 
894
 
In ggo files comments start with # and end at EOL
895
 
 
896
 
  -h, --help                    Print help and exit
897
 
      --full-help               Print help, including hidden options, and exit
898
 
  -V, --version                 Print version and exit
899
 
 
900
 
  -s, --string=STRING            string option
901
 
  -i, --int=INT                 int option
902
 
  -S, --short=SHORT             short option
903
 
  -l, --long=LONG               long option
904
 
  -f, --float=FLOAT             float option
905
 
  -d, --double=DOUBLE           double option
906
 
  -D, --longdouble=LONGDOUBLE   longdouble option
907
 
  -L, --longlong=LONGLONG       longlong option
908
 
  -F, --flag                    flag option  (default=on)
909
 
  -u, --function                function option
910
 
      --no-short                no short option
911
 
      --opt-arg[=STRING]        option with optional arg
912
 
  -o, --opt-arg-short[=STRING]  option with optional arg (short)
913
 
  -r, --required=STRING         required option (mandatory)
914
 
 
915
 
Before the dependant option there is a hidden option, so it shouldn't be 
916
 
visible in the output of --help, but it will be visible in the output of 
917
 
--full-help.
918
 
 
919
 
  -H, --hidden=INT              hidden option
920
 
  -A, --dependant=STRING        option that depends on opt-arg
921
 
 
922
 
This is a text line just to write something in the output
923
 
 
924
 
Notice that a text line can contain line breaks, just like this very text, and 
925
 
that, just like all the other texts, it is wrapped by gengetopt automatically 
926
 
if it's too long.
927
 
 
928
 
Moreover, text can be specified more than once in the input file.
929
 
 
930
 
      --very-very-long-option=STRING
931
 
                                the name of this option is long enough to make 
932
 
                                  this description begin on a new line
933
 
  -y, --assume-multimeth-virtual
934
 
                                the name of this option is just as long as the 
935
 
                                  maximum allowed, so this description begin on 
936
 
                                  a new line
937
 
      --file-save=STRING        save the passed options into a file
938
 
 
939
 
A text after all options.
940
 
test_all_opts 1.0
941
 
 
942
 
This is just a gengetopt's test file
943
 
 
944
 
Usage: test_all_opts -rSTRING|--required=STRING [-h|--help] [--full-help] 
945
 
         [-V|--version] [-sSTRING|--string=STRING] [-iINT|--int=INT] 
946
 
         [-SSHORT|--short=SHORT] [-lLONG|--long=LONG] [-fFLOAT|--float=FLOAT] 
947
 
         [-dDOUBLE|--double=DOUBLE] [-DLONGDOUBLE|--longdouble=LONGDOUBLE] 
948
 
         [-LLONGLONG|--longlong=LONGLONG] [-F|--flag] [-u|--function] 
949
 
         [--no-short] [--opt-arg=STRING] [-oSTRING|--opt-arg-short=STRING] 
950
 
         [-ASTRING|--dependant=STRING] [--very-very-long-option=STRING] 
951
 
         [-y|--assume-multimeth-virtual] [--file-save=STRING] 
952
 
 
953
 
This is just a test file
954
 
 
955
 
to test all possible
956
 
command line type options.
957
 
 
958
 
In ggo files comments start with # and end at EOL
959
 
 
960
 
 
961
 
  -h, --help                    Print help and exit
962
 
      --full-help               Print help, including hidden options, and exit
963
 
  -V, --version                 Print version and exit
964
 
 
965
 
  -s, --string=STRING            string option
966
 
  -i, --int=INT                 int option
967
 
  -S, --short=SHORT             short option
968
 
  -l, --long=LONG               long option
969
 
  -f, --float=FLOAT             float option
970
 
  -d, --double=DOUBLE           double option
971
 
  -D, --longdouble=LONGDOUBLE   longdouble option
972
 
  -L, --longlong=LONGLONG       longlong option
973
 
  -F, --flag                    flag option  (default=on)
974
 
  -u, --function                function option
975
 
      --no-short                no short option
976
 
      --opt-arg[=STRING]        option with optional arg
977
 
  -o, --opt-arg-short[=STRING]  option with optional arg (short)
978
 
  -r, --required=STRING         required option
979
 
 
980
 
Before the dependant option there is a hidden option, so it shouldn't be 
981
 
visible in the output of --help, but it will be visible in the output of 
982
 
--full-help.
983
 
 
 
1164
*** test_sections_option_help -h
 
1165
help_help:   -h, --help                   Print help and exit
 
1166
version_help:   -V, --version                Print version and exit
 
1167
string_help:   -s, --string=STRING          string option
 
1168
int_help:   -i, --int=INT                int option
 
1169
short_help:   -S, --short=SHORT            short option
 
1170
long_help:   -l, --long=LONG              long option
 
1171
float_help:   -f, --float=FLOAT            float option
 
1172
double_help:   -d, --double=DOUBLE          double option
 
1173
longdouble_help:   -D, --longdouble=LONGDOUBLE  longdouble option
 
1174
longlong_help:   -L, --longlong=LONGLONG      longlong option
 
1175
flag_help:   -F, --flag                   flag option  (default=on)
 
1176
function_help:   -u, --function               function option
 
1177
no_short_help:       --no-short               no short option
 
1178
required_help:   -r, --required=STRING        required option (mandatory)
 
1179
*** test_all_opts_option_help -h
 
1180
help_help:   -h, --help                    Print help and exit
 
1181
full_help_help:       --full-help               Print help, including hidden options, and exit
 
1182
version_help:   -V, --version                 Print version and exit
 
1183
string_help:   -s, --string=STRING            string option
 
1184
int_help:   -i, --int=INT                 int option
 
1185
short_help:   -S, --short=SHORT             short option
 
1186
long_help:   -l, --long=LONG               long option
 
1187
float_help:   -f, --float=FLOAT             float option
 
1188
double_help:   -d, --double=DOUBLE           double option
 
1189
longdouble_help:   -D, --longdouble=LONGDOUBLE   longdouble option
 
1190
longlong_help:   -L, --longlong=LONGLONG       longlong option
 
1191
flag_help:   -F, --flag                    flag option  (default=on)
 
1192
function_help:   -u, --function                function option
 
1193
no_short_help:       --no-short                no short option
 
1194
opt_arg_help:       --opt-arg[=STRING]        option with optional arg
 
1195
opt_arg_short_help:   -o, --opt-arg-short[=STRING]  option with optional arg (short)
 
1196
required_help:   -r, --required=STRING         required option (mandatory)
 
1197
hidden_help:   -H, --hidden=INT              hidden option
 
1198
dependant_help:   -A, --dependant=STRING        option that depends on opt-arg
 
1199
very_very_long_option_help:       --very-very-long-option=STRING
 
1200
                                the name of this option is long enough to make 
 
1201
                                  this description begin on a new line
 
1202
assume_multimeth_virtual_help:   -y, --assume-multimeth-virtual
 
1203
                                the name of this option is just as long as the 
 
1204
                                  maximum allowed, so this description begin on 
 
1205
                                  a new line
 
1206
file_save_help:       --file-save=STRING        save the passed options into a file
 
1207
*** test_groups_option_help -h
 
1208
help_help:   -h, --help              Print help and exit
 
1209
version_help:   -V, --version           Print version and exit
 
1210
opta_help:   -a, --opta              string a
 
1211
optA_help:   -A, --optA[=STRING]     string A
 
1212
optAmul_help:   -M, --optAmul[=STRING]  string M
 
1213
optb_help:   -b, --optb              string b
 
1214
optc_help:       --optc              string c
 
1215
optd_help:   -d, --optd              string d
 
1216
*** test_modes_option_help -h
 
1217
help_help:   -h, --help              Print help and exit
 
1218
version_help:   -V, --version           Print version and exit
 
1219
opta_help:   -a, --opta              string a
 
1220
optA_help:   -A, --optA[=STRING]     string A (mandatory)
 
1221
optAmul_help:   -M, --optAmul[=STRING]  string M
 
1222
optb_help:   -b, --optb              string b
 
1223
optc_help:       --optc              string c
 
1224
optd_help:   -d, --optd              string d (mandatory)
 
1225
mopt_help:   -m, --mopt=INT          option of my mode
 
1226
*** test_no_options -h
 
1227
test_no_options 1.0
 
1228
 
 
1229
This is a program with no option but the default ones
 
1230
 
 
1231
Usage: test_no_options [OPTIONS]... [FILES]...
 
1232
 
 
1233
  -h, --help     Print help and exit
 
1234
  -V, --version  Print version and exit
 
1235
*** test_all_opts --full-help
 
1236
test_all_opts 1.0
 
1237
 
 
1238
This is just a gengetopt's test file
 
1239
 
 
1240
Usage: test_all_opts [OPTIONS]... [FILES]...
 
1241
 
 
1242
This is just a test file
 
1243
 
 
1244
to test all possible
 
1245
command line type options.
 
1246
 
 
1247
In ggo files comments start with # and end at EOL
 
1248
 
 
1249
  -h, --help                    Print help and exit
 
1250
      --detailed-help           Print help, including all details and hidden 
 
1251
                                  options, and exit
 
1252
      --full-help               Print help, including hidden options, and exit
 
1253
  -V, --version                 Print version and exit
 
1254
 
 
1255
  -s, --string=STRING            string option
 
1256
  -i, --int=INT                 int option
 
1257
  -S, --short=SHORT             short option
 
1258
  -l, --long=LONG               long option
 
1259
  -f, --float=FLOAT             float option
 
1260
  -d, --double=DOUBLE           double option
 
1261
  -D, --longdouble=LONGDOUBLE   longdouble option
 
1262
  -L, --longlong=LONGLONG       longlong option
 
1263
  -F, --flag                    flag option  (default=on)
 
1264
  -u, --function                function option
 
1265
      --no-short                no short option
 
1266
      --opt-arg[=STRING]        option with optional arg
 
1267
  -o, --opt-arg-short[=STRING]  option with optional arg (short)
 
1268
  -r, --required=STRING         required option (mandatory)
 
1269
 
 
1270
Before the dependant option there is a hidden option, so it shouldn't be 
 
1271
visible in the output of --help, but it will be visible in the output of 
 
1272
--full-help.
 
1273
 
 
1274
  -H, --hidden=INT              hidden option
 
1275
  -A, --dependant=STRING        option that depends on opt-arg
 
1276
 
 
1277
This is a text line just to write something in the output
 
1278
 
 
1279
Notice that a text line can contain line breaks, just like this very text, and 
 
1280
that, just like all the other texts, it is wrapped by gengetopt automatically 
 
1281
if it's too long.
 
1282
 
 
1283
Moreover, text can be specified more than once in the input file.
 
1284
 
 
1285
      --very-very-long-option=STRING
 
1286
                                the name of this option is long enough to make 
 
1287
                                  this description begin on a new line
 
1288
  -y, --assume-multimeth-virtual
 
1289
                                the name of this option is just as long as the 
 
1290
                                  maximum allowed, so this description begin on 
 
1291
                                  a new line
 
1292
      --file-save=STRING        save the passed options into a file
 
1293
 
 
1294
A text after all options.
 
1295
*** test_all_opts --detailed-help
 
1296
test_all_opts 1.0
 
1297
 
 
1298
This is just a gengetopt's test file
 
1299
 
 
1300
Usage: test_all_opts [OPTIONS]... [FILES]...
 
1301
 
 
1302
This is just a test file
 
1303
 
 
1304
to test all possible
 
1305
command line type options.
 
1306
 
 
1307
In ggo files comments start with # and end at EOL
 
1308
 
 
1309
  -h, --help                    Print help and exit
 
1310
      --detailed-help           Print help, including all details and hidden 
 
1311
                                  options, and exit
 
1312
      --full-help               Print help, including hidden options, and exit
 
1313
  -V, --version                 Print version and exit
 
1314
 
 
1315
  -s, --string=STRING            string option
 
1316
  -i, --int=INT                 int option
 
1317
  -S, --short=SHORT             short option
 
1318
  -l, --long=LONG               long option
 
1319
  -f, --float=FLOAT             float option
 
1320
  -d, --double=DOUBLE           double option
 
1321
  -D, --longdouble=LONGDOUBLE   longdouble option
 
1322
  -L, --longlong=LONGLONG       longlong option
 
1323
  -F, --flag                    flag option  (default=on)
 
1324
  -u, --function                function option
 
1325
  
 
1326
  a function option is basically an option with no argument.  It can be used, 
 
1327
  e.g., to specify a specific behavior for a program.
 
1328
 
 
1329
  Well, this further explanation is quite useless, but it's only to show an 
 
1330
  example of an option with details, which will be printed only when 
 
1331
  --detailed-help is given at the command line.
 
1332
 
 
1333
      --no-short                no short option
 
1334
      --opt-arg[=STRING]        option with optional arg
 
1335
  -o, --opt-arg-short[=STRING]  option with optional arg (short)
 
1336
  -r, --required=STRING         required option (mandatory)
 
1337
  NOTICE: This option is required, so, unless you specify (-h)--help or 
 
1338
  (-V)--version, you must always specify this option (and its argument) at 
 
1339
  command line.
 
1340
 
 
1341
Before the dependant option there is a hidden option, so it shouldn't be 
 
1342
visible in the output of --help, but it will be visible in the output of 
 
1343
--full-help.
 
1344
 
 
1345
  -H, --hidden=INT              hidden option
 
1346
  -A, --dependant=STRING        option that depends on opt-arg
 
1347
 
 
1348
This is a text line just to write something in the output
 
1349
 
 
1350
Notice that a text line can contain line breaks, just like this very text, and 
 
1351
that, just like all the other texts, it is wrapped by gengetopt automatically 
 
1352
if it's too long.
 
1353
 
 
1354
Moreover, text can be specified more than once in the input file.
 
1355
 
 
1356
      --very-very-long-option=STRING
 
1357
                                the name of this option is long enough to make 
 
1358
                                  this description begin on a new line
 
1359
  -y, --assume-multimeth-virtual
 
1360
                                the name of this option is just as long as the 
 
1361
                                  maximum allowed, so this description begin on 
 
1362
                                  a new line
 
1363
      --file-save=STRING        save the passed options into a file
 
1364
 
 
1365
A text after all options.
 
1366
*** test_no_handle_help --detailed-help
 
1367
####################
 
1368
# HEADER
 
1369
####################
 
1370
test_no_handle_help 1.0
 
1371
 
 
1372
Usage: test_no_handle_help [OPTIONS]... [FILES]...
 
1373
 
 
1374
  -h, --help           Print help and exit
 
1375
      --detailed-help  Print help, including all details and hidden options, 
 
1376
                         and exit
 
1377
  -V, --version        Print version and exit
 
1378
      --height=INT     this is the description of height
 
1379
  These are the details of option height
 
1380
      --vavoom=STRING  this is the description of vavoom
 
1381
####################
 
1382
# FOOTER
 
1383
####################
 
1384
test_all_opts 1.0
 
1385
 
 
1386
This is just a gengetopt's test file
 
1387
 
 
1388
Usage: test_all_opts -rSTRING|--required=STRING [-h|--help] [--detailed-help] 
 
1389
         [--full-help] [-V|--version] [-sSTRING|--string=STRING] 
 
1390
         [-iINT|--int=INT] [-SSHORT|--short=SHORT] [-lLONG|--long=LONG] 
 
1391
         [-fFLOAT|--float=FLOAT] [-dDOUBLE|--double=DOUBLE] 
 
1392
         [-DLONGDOUBLE|--longdouble=LONGDOUBLE] 
 
1393
         [-LLONGLONG|--longlong=LONGLONG] [-F|--flag] [-u|--function] 
 
1394
         [--no-short] [--opt-arg=STRING] [-oSTRING|--opt-arg-short=STRING] 
 
1395
         [-ASTRING|--dependant=STRING] [--very-very-long-option=STRING] 
 
1396
         [-y|--assume-multimeth-virtual] [--file-save=STRING]
 
1397
 
 
1398
This is just a test file
 
1399
 
 
1400
to test all possible
 
1401
command line type options.
 
1402
 
 
1403
In ggo files comments start with # and end at EOL
 
1404
 
 
1405
 
 
1406
  -h, --help                    Print help and exit
 
1407
      --detailed-help           Print help, including all details and hidden 
 
1408
                                  options, and exit
 
1409
      --full-help               Print help, including hidden options, and exit
 
1410
  -V, --version                 Print version and exit
 
1411
 
 
1412
  -s, --string=STRING            string option
 
1413
  -i, --int=INT                 int option
 
1414
  -S, --short=SHORT             short option
 
1415
  -l, --long=LONG               long option
 
1416
  -f, --float=FLOAT             float option
 
1417
  -d, --double=DOUBLE           double option
 
1418
  -D, --longdouble=LONGDOUBLE   longdouble option
 
1419
  -L, --longlong=LONGLONG       longlong option
 
1420
  -F, --flag                    flag option  (default=on)
 
1421
  -u, --function                function option
 
1422
      --no-short                no short option
 
1423
      --opt-arg[=STRING]        option with optional arg
 
1424
  -o, --opt-arg-short[=STRING]  option with optional arg (short)
 
1425
  -r, --required=STRING         required option
 
1426
 
 
1427
Before the dependant option there is a hidden option, so it shouldn't be 
 
1428
visible in the output of --help, but it will be visible in the output of 
 
1429
--full-help.
 
1430
 
 
1431
  -A, --dependant=STRING        option that depends on opt-arg
 
1432
 
 
1433
This is a text line just to write something in the output
 
1434
 
 
1435
Notice that a text line can contain line breaks, just like this very text, and 
 
1436
that, just like all the other texts, it is wrapped by gengetopt automatically 
 
1437
if it's too long.
 
1438
 
 
1439
Moreover, text can be specified more than once in the input file.
 
1440
 
 
1441
      --very-very-long-option=STRING
 
1442
                                the name of this option is long enough to make 
 
1443
                                  this description begin on a new line
 
1444
  -y, --assume-multimeth-virtual
 
1445
                                the name of this option is just as long as the 
 
1446
                                  maximum allowed, so this description begin on 
 
1447
                                  a new line
 
1448
      --file-save=STRING        save the passed options into a file
 
1449
 
 
1450
A text after all options.
 
1451
test_all_opts 1.0
 
1452
 
 
1453
This is just a gengetopt's test file
 
1454
 
 
1455
Usage: test_all_opts -rSTRING|--required=STRING [-h|--help] [--detailed-help] 
 
1456
         [--full-help] [-V|--version] [-sSTRING|--string=STRING] 
 
1457
         [-iINT|--int=INT] [-SSHORT|--short=SHORT] [-lLONG|--long=LONG] 
 
1458
         [-fFLOAT|--float=FLOAT] [-dDOUBLE|--double=DOUBLE] 
 
1459
         [-DLONGDOUBLE|--longdouble=LONGDOUBLE] 
 
1460
         [-LLONGLONG|--longlong=LONGLONG] [-F|--flag] [-u|--function] 
 
1461
         [--no-short] [--opt-arg=STRING] [-oSTRING|--opt-arg-short=STRING] 
 
1462
         [-ASTRING|--dependant=STRING] [--very-very-long-option=STRING] 
 
1463
         [-y|--assume-multimeth-virtual] [--file-save=STRING]
 
1464
 
 
1465
This is just a test file
 
1466
 
 
1467
to test all possible
 
1468
command line type options.
 
1469
 
 
1470
In ggo files comments start with # and end at EOL
 
1471
 
 
1472
 
 
1473
  -h, --help                    Print help and exit
 
1474
      --detailed-help           Print help, including all details and hidden 
 
1475
                                  options, and exit
 
1476
      --full-help               Print help, including hidden options, and exit
 
1477
  -V, --version                 Print version and exit
 
1478
 
 
1479
  -s, --string=STRING            string option
 
1480
  -i, --int=INT                 int option
 
1481
  -S, --short=SHORT             short option
 
1482
  -l, --long=LONG               long option
 
1483
  -f, --float=FLOAT             float option
 
1484
  -d, --double=DOUBLE           double option
 
1485
  -D, --longdouble=LONGDOUBLE   longdouble option
 
1486
  -L, --longlong=LONGLONG       longlong option
 
1487
  -F, --flag                    flag option  (default=on)
 
1488
  -u, --function                function option
 
1489
      --no-short                no short option
 
1490
      --opt-arg[=STRING]        option with optional arg
 
1491
  -o, --opt-arg-short[=STRING]  option with optional arg (short)
 
1492
  -r, --required=STRING         required option
 
1493
 
 
1494
Before the dependant option there is a hidden option, so it shouldn't be 
 
1495
visible in the output of --help, but it will be visible in the output of 
 
1496
--full-help.
 
1497
 
 
1498
  -H, --hidden=INT              hidden option
 
1499
  -A, --dependant=STRING        option that depends on opt-arg
 
1500
 
 
1501
This is a text line just to write something in the output
 
1502
 
 
1503
Notice that a text line can contain line breaks, just like this very text, and 
 
1504
that, just like all the other texts, it is wrapped by gengetopt automatically 
 
1505
if it's too long.
 
1506
 
 
1507
Moreover, text can be specified more than once in the input file.
 
1508
 
 
1509
      --very-very-long-option=STRING
 
1510
                                the name of this option is long enough to make 
 
1511
                                  this description begin on a new line
 
1512
  -y, --assume-multimeth-virtual
 
1513
                                the name of this option is just as long as the 
 
1514
                                  maximum allowed, so this description begin on 
 
1515
                                  a new line
 
1516
      --file-save=STRING        save the passed options into a file
 
1517
 
 
1518
A text after all options.
 
1519
test_modes 1.0
 
1520
 
 
1521
Usage: test_modes [-h|--help] [-V|--version] [-N|--no-mode] [--no-mode2=STRING]
 
1522
  or : test_modes -d|--optd [--optc]
 
1523
  or : test_modes -ASTRING|--optA=STRING [-a|--opta] 
 
1524
         [-MSTRING|--optAmul=STRING] [-b|--optb]
 
1525
  or : test_modes [-mINT|--mopt=INT]
 
1526
 
 
1527
  -h, --help              Print help and exit
 
1528
  -V, --version           Print version and exit
 
1529
 
 
1530
some non mode options:
 
1531
  -N, --no-mode           a generic option not beloging to any mode
 
1532
      --no-mode2=STRING   another generic option not beloging to any mode
 
1533
 
 
1534
some modes just for testing:
 
1535
 
 
1536
 Mode: mode1
 
1537
  any option of this mode is in contrast with any option of the other mode
 
1538
  Notice that this description is quite long so it may spawn many lines...      
 
1539
          fortunately gengetopt will wrap it for you :-)
 
1540
  -a, --opta              string a
 
1541
  -A, --optA[=STRING]     string A
 
1542
  -M, --optAmul[=STRING]  string M
 
1543
  -b, --optb              string b
 
1544
 
 
1545
 Mode: mode 2
 
1546
      --optc              string c
 
1547
  -d, --optd              string d
 
1548
 
 
1549
 Mode: my mode
 
1550
  -m, --mopt=INT          option of my mode
 
1551
test_all_opts 1.0
 
1552
 
 
1553
This is just a gengetopt's test file
 
1554
 
 
1555
Usage: test_all_opts -rSTRING|--required=STRING [-h|--help] [--detailed-help] 
 
1556
         [--full-help] [-V|--version] [-sSTRING|--string=STRING] 
 
1557
         [-iINT|--int=INT] [-SSHORT|--short=SHORT] [-lLONG|--long=LONG] 
 
1558
         [-fFLOAT|--float=FLOAT] [-dDOUBLE|--double=DOUBLE] 
 
1559
         [-DLONGDOUBLE|--longdouble=LONGDOUBLE] 
 
1560
         [-LLONGLONG|--longlong=LONGLONG] [-F|--flag] [-u|--function] 
 
1561
         [--no-short] [--opt-arg=STRING] [-oSTRING|--opt-arg-short=STRING] 
 
1562
         [-ASTRING|--dependant=STRING] [--very-very-long-option=STRING] 
 
1563
         [-y|--assume-multimeth-virtual] [--file-save=STRING]
 
1564
 
 
1565
This is just a test file
 
1566
 
 
1567
to test all possible
 
1568
command line type options.
 
1569
 
 
1570
In ggo files comments start with # and end at EOL
 
1571
 
 
1572
 
 
1573
  -h, --help                    Print help and exit
 
1574
      --detailed-help           Print help, including all details and hidden 
 
1575
                                  options, and exit
 
1576
      --full-help               Print help, including hidden options, and exit
 
1577
  -V, --version                 Print version and exit
 
1578
 
 
1579
  -s, --string=STRING            string option
 
1580
  -i, --int=INT                 int option
 
1581
  -S, --short=SHORT             short option
 
1582
  -l, --long=LONG               long option
 
1583
  -f, --float=FLOAT             float option
 
1584
  -d, --double=DOUBLE           double option
 
1585
  -D, --longdouble=LONGDOUBLE   longdouble option
 
1586
  -L, --longlong=LONGLONG       longlong option
 
1587
  -F, --flag                    flag option  (default=on)
 
1588
  -u, --function                function option
 
1589
  
 
1590
  a function option is basically an option with no argument.  It can be used, 
 
1591
  e.g., to specify a specific behavior for a program.
 
1592
 
 
1593
  Well, this further explanation is quite useless, but it's only to show an 
 
1594
  example of an option with details, which will be printed only when 
 
1595
  --detailed-help is given at the command line.
 
1596
 
 
1597
      --no-short                no short option
 
1598
      --opt-arg[=STRING]        option with optional arg
 
1599
  -o, --opt-arg-short[=STRING]  option with optional arg (short)
 
1600
  -r, --required=STRING         required option
 
1601
  NOTICE: This option is required, so, unless you specify (-h)--help or 
 
1602
  (-V)--version, you must always specify this option (and its argument) at 
 
1603
  command line.
 
1604
 
 
1605
Before the dependant option there is a hidden option, so it shouldn't be 
 
1606
visible in the output of --help, but it will be visible in the output of 
 
1607
--full-help.
 
1608
 
 
1609
  -H, --hidden=INT              hidden option
984
1610
  -A, --dependant=STRING        option that depends on opt-arg
985
1611
 
986
1612
This is a text line just to write something in the output
1004
1630
only_hidden 0.1
1005
1631
 
1006
1632
Usage: only_hidden --nonhidden=STRING --nonhidden2=STRING [-h|--help] 
1007
 
         [--full-help] [-V|--version] 
 
1633
         [--full-help] [-V|--version]
1008
1634
 
1009
1635
  -h, --help               Print help and exit
1010
1636
      --full-help          Print help, including hidden options, and exit
1016
1642
only_hidden 0.1
1017
1643
 
1018
1644
Usage: only_hidden --nonhidden=STRING --nonhidden2=STRING [-h|--help] 
1019
 
         [--full-help] [-V|--version] 
 
1645
         [--full-help] [-V|--version]
1020
1646
 
1021
1647
  -h, --help               Print help and exit
1022
1648
      --full-help          Print help, including hidden options, and exit
1029
1655
Hidden section.  This contains only hidden options:
1030
1656
      --hidden=STRING      hidden
1031
1657
      --hidden2=STRING     hidden2
 
1658
test align 1.0
 
1659
 
 
1660
this is just a test to check that the output of --help and --full-help are 
 
1661
aligned just the same
 
1662
 
 
1663
Usage: test align [OPTIONS]...
 
1664
 
 
1665
  -h, --help           Print help and exit
 
1666
      --full-help      Print help, including hidden options, and exit
 
1667
  -V, --version        Print version and exit
 
1668
 
 
1669
Operation modes and settings:
 
1670
  
 
1671
  Non-absolute pathnames are relative to the executable's directory.
 
1672
 
 
1673
 
 
1674
 Mode: standalone
 
1675
  -y, --non-hidden     non-hidden option
 
1676
test align 1.0
 
1677
 
 
1678
this is just a test to check that the output of --help and --full-help are 
 
1679
aligned just the same
 
1680
 
 
1681
Usage: test align [OPTIONS]...
 
1682
 
 
1683
  -h, --help           Print help and exit
 
1684
      --full-help      Print help, including hidden options, and exit
 
1685
  -V, --version        Print version and exit
 
1686
  -m, --hidden-option  This is the hidden option that is printed only with 
 
1687
                         --full-help; thanks to its long description we force a 
 
1688
                         possible different alignment for --full-help
 
1689
 
 
1690
Operation modes and settings:
 
1691
  
 
1692
  Non-absolute pathnames are relative to the executable's directory.
 
1693
 
 
1694
 
 
1695
 Mode: standalone
 
1696
  -y, --non-hidden     non-hidden option
1032
1697
required_or_optional 0.1
1033
1698
 
1034
1699
Usage: required_or_optional --required=STRING --non-specified=STRING 
1035
 
         --non-specified2=STRING [-h|--help] [-V|--version] [--optional=STRING] 
1036
 
         
 
1700
         --non-specified2=STRING [-h|--help] [-V|--version] [--optional=STRING]
1037
1701
 
1038
1702
  -h, --help                   Print help and exit
1039
1703
  -V, --version                Print version and exit
1050
1714
required_or_optional 0.1
1051
1715
 
1052
1716
Usage: required_or_optional --required=STRING [-h|--help] [-V|--version] 
1053
 
         [--optional=STRING] [--non-specified=STRING] [--non-specified2=STRING] 
1054
 
         
 
1717
         [--optional=STRING] [--non-specified=STRING] [--non-specified2=STRING]
1055
1718
 
1056
1719
  -h, --help                   Print help and exit
1057
1720
  -V, --version                Print version and exit