]> mj.ucw.cz Git - libucw.git/blob - ucw/opt.t
Mempool: Fixed bug in mp_stats().
[libucw.git] / ucw / opt.t
1 # Tests of the command line option parser
2
3 Name:   Opt-1
4 Run:    ../obj/ucw/opt-test 2>&1 1>/dev/null
5 Exit:   2
6 Out:    Required option -t/--temperature not found.
7         Run with --help for more information.
8
9 Name:   Opt-2
10 Run:    ../obj/ucw/opt-test -t95C -w640 -gG darjeeling
11 Out:    English style: no|Chosen teapot: glass|Temperature: 95C|Verbosity: 1|Prayer: no|Clean: yes|Water amount: 640|Gas: yes|First tea: darjeeling|Everything OK. Bye.
12
13 Name:   Opt-3
14 Run:    ../obj/ucw/opt-test -vvqvqvhpe -t120F -w4 darjeeling
15 Out:    English style: yes|Chosen teapot: hands|Temperature: 120F|Verbosity: 3|Prayer: yes|Clean: yes|Water amount: 4|Gas: no|First tea: darjeeling|Everything OK. Bye.
16
17 Name:   Opt-4
18 Run:    ../obj/ucw/opt-test -t120F -w4 puerh darjeeling earl-grey
19 Out:    English style: no|Temperature: 120F|Verbosity: 1|Prayer: no|Clean: yes|Water amount: 4|Gas: no|First tea: puerh|Boiling a tea: darjeeling|Boiling a tea: earl-grey|Everything OK. Bye.
20
21 Name:   Opt-5
22 Run:    ../obj/ucw/opt-test -ghx 2>&1 1>/dev/null
23 Exit:   2
24 Out:    Multiple switches: -h
25         Run with --help for more information.
26
27 Name:   Opt-6
28 Run:    ../obj/ucw/opt-test -t120F -w4 -b15 -he -- --puerh darjeeling earl-grey
29 Out:    English style: yes|Chosen teapot: hands|Temperature: 120F|Verbosity: 1|Black magic: 15|Prayer: no|Clean: yes|Water amount: 4|Gas: no|First tea: --puerh|Boiling a tea: darjeeling|Boiling a tea: earl-grey|Everything OK. Bye.
30
31 Name:   Opt-7
32 Run:    ../obj/ucw/opt-test -t120F -w4 -b15 -b54 -he -- --puerh darjeeling earl-grey
33 Out:    English style: yes|Chosen teapot: hands|Temperature: 120F|Verbosity: 1|Black magic: 15|Black magic: 54|Prayer: no|Clean: yes|Water amount: 4|Gas: no|First tea: --puerh|Boiling a tea: darjeeling|Boiling a tea: earl-grey|Everything OK. Bye.
34
35 Name:   Opt-bool-1
36 Run:    ../obj/ucw/opt-test -t95C -w640 -gG darjeeling --english-style
37 Out:    English style: yes|Chosen teapot: glass|Temperature: 95C|Verbosity: 1|Prayer: no|Clean: yes|Water amount: 640|Gas: yes|First tea: darjeeling|Everything OK. Bye.
38
39 Name:   Opt-bool-2
40 Run:    ../obj/ucw/opt-test -t95C -w640 -gG darjeeling --english-style --no-english-style
41 Out:    English style: no|Chosen teapot: glass|Temperature: 95C|Verbosity: 1|Prayer: no|Clean: yes|Water amount: 640|Gas: yes|First tea: darjeeling|Everything OK. Bye.
42
43 Name:   Opt-bool-negative-1
44 Run:    ../obj/ucw/opt-test -t95C -w640 -gG darjeeling --clean
45 Out:    English style: no|Chosen teapot: glass|Temperature: 95C|Verbosity: 1|Prayer: no|Clean: yes|Water amount: 640|Gas: yes|First tea: darjeeling|Everything OK. Bye.
46
47 Name:   Opt-bool-negative-2
48 Run:    ../obj/ucw/opt-test -t95C -w640 -gG darjeeling --no-clean
49 Out:    English style: no|Chosen teapot: glass|Temperature: 95C|Verbosity: 1|Prayer: no|Clean: no|Water amount: 640|Gas: yes|First tea: darjeeling|Everything OK. Bye.
50
51 Name:   Opt-Conf-1
52 Run:    ../obj/ucw/opt-test -h -SX.Y=Z 2>&1 1>/dev/null
53 Exit:   2
54 Out:    Config options must stand before other options.
55         Run with --help for more information.
56
57 Name:   Opt-Hook-1
58 Run:    ../obj/ucw/opt-test -Ht 95C -w640 -gG darjeeling
59 Out:    [HOOK-postval:H/show-hooks=(null)] [HOOK-preval:t/temperature=95C] [HOOK-postval:t/temperature=95C] [HOOK-prearg] [HOOK-preval:w/water=640] [HOOK-postval:w/water=640] [HOOK-prearg] [HOOK-preval:g/glass-set=(null)] [HOOK-postval:g/glass-set=(null)] [HOOK-preval:G/with-gas=(null)] [HOOK-postval:G/with-gas=(null)] [HOOK-prearg] [HOOK-preval:\81/(null)=darjeeling] [HOOK-postval:\81/(null)=darjeeling] English style: no|Chosen teapot: glass|Temperature: 95C|Verbosity: 1|Prayer: no|Clean: yes|Water amount: 640|Gas: yes|First tea: darjeeling|Everything OK. Bye.