]> mj.ucw.cz Git - libucw.git/blob - ucw/opt.t
Opt: Tests and some minor fixes
[libucw.git] / ucw / opt.t
1 # Tests of the command line option parser
2
3 Name:   Opt-1
4 Run:    ( ../obj/ucw/opt-t 2>&1 1>/dev/null || [ $? -eq "2" ] ) | tr -d '\n'
5 Out:    Required option -t not found.Run with argument --help for more information.
6
7 Name:   Opt-2
8 Run:    ../obj/ucw/opt-t -t95C -w640 -gG darjeeling
9 Out:    English style: no|Chosen teapot: glass|Temperature: 95C|Verbosity: 1|Prayer: no|Water amount: 640|Gas: yes|First tea: darjeeling|Everything OK. Bye.
10
11 Name:   Opt-3
12 Run:    ../obj/ucw/opt-t -vvqvqvhpe -t120F -w4 darjeeling
13 Out:    English style: yes|Chosen teapot: hands|Temperature: 120F|Verbosity: 3|Prayer: yes|Water amount: 4|Gas: no|First tea: darjeeling|Everything OK. Bye.
14
15 Name:   Opt-4
16 Run:    ../obj/ucw/opt-t -t120F -w4 puerh darjeeling earl-gray
17 Out:    English style: no|Temperature: 120F|Verbosity: 1|Prayer: no|Water amount: 4|Gas: no|First tea: puerh|Boiling a tea: darjeeling|Boiling a tea: earl-gray|Everything OK. Bye.
18
19 Name:   Opt-5
20 Run:    ( ../obj/ucw/opt-t -ghx 2>&1 1>/dev/null || [ $? -eq "2" ] ) | tr -d '\n'
21 Out:    Multiple switches: -hRun with argument --help for more information.
22
23 Name:   Opt-6
24 Run:    ../obj/ucw/opt-t -t120F -w4 -b15 -he -- --puerh darjeeling earl-gray
25 Out:    English style: yes|Chosen teapot: hands|Temperature: 120F|Verbosity: 1|Black magic: 15|Prayer: no|Water amount: 4|Gas: no|First tea: --puerh|Boiling a tea: darjeeling|Boiling a tea: earl-gray|Everything OK. Bye.