source: tests/configs/.expect/parsebools.txt @ a51b8f6

ADTast-experimental
Last change on this file since a51b8f6 was fd90096, checked in by Thierry Delisle <tdelisle@…>, 22 months ago

Added tests for parse args of bools and numbers

  • Property mode set to 100644
File size: 2.9 KB
Line 
1no arg:
2yes/no     :false
3Y/N        :false
4y/n        :false
5true/false :false
6set true   :false
7set false  :true
8Child status:
9    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
10
11all true/set arg:
12yes/no     :true
13Y/N        :true
14y/n        :true
15true/false :true
16set true   :true
17set false  :false
18Child status:
19    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
20
21all false/unset arg:
22yes/no     :false
23Y/N        :false
24y/n        :false
25true/false :false
26set true   :false
27set false  :true
28Child status:
29    WIFEXITED   : 1    WEXITSTATUS : 0    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 0    WIFCONTINUED: 0
30
31gibberish arg 1:
32Argument 'true' for option y could not be parsed
33
34Usage:
35  parsebools [OPTIONS]...
36testing bool parameters
37  -e, --yesno       test yes/no
38  -y, --YN          test yes/no
39  -n, --yn          test yes/no
40  -t, --truefalse   test true/false
41  -s, --settrue     test set true
42  -u, --setfalse    test set false
43  -h, --help        print this help message
44Child status:
45    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
46
47gibberish arg 2:
48Argument 'yes' for option t could not be parsed
49
50Usage:
51  parsebools [OPTIONS]...
52testing bool parameters
53  -e, --yesno       test yes/no
54  -y, --YN          test yes/no
55  -n, --yn          test yes/no
56  -t, --truefalse   test true/false
57  -s, --settrue     test set true
58  -u, --setfalse    test set false
59  -h, --help        print this help message
60Child status:
61    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
62
63gibberish arg 3:
64parsebools: invalid option -- '='
65Usage:
66  parsebools [OPTIONS]...
67testing bool parameters
68  -e, --yesno       test yes/no
69  -y, --YN          test yes/no
70  -n, --yn          test yes/no
71  -t, --truefalse   test true/false
72  -s, --settrue     test set true
73  -u, --setfalse    test set false
74  -h, --help        print this help message
75Child status:
76    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
77
78gibberish arg 4:
79parsebools: invalid option -- '='
80Usage:
81  parsebools [OPTIONS]...
82testing bool parameters
83  -e, --yesno       test yes/no
84  -y, --YN          test yes/no
85  -n, --yn          test yes/no
86  -t, --truefalse   test true/false
87  -s, --settrue     test set true
88  -u, --setfalse    test set false
89  -h, --help        print this help message
90Child status:
91    WIFEXITED   : 1    WEXITSTATUS : 1    WIFSIGNALED : 0    WTERMSIG    : 0    WCOREDUMP   : 0    WIFSTOPPED  : 0    WSTOPSIG    : 1    WIFCONTINUED: 0
92
93All Done!
Note: See TracBrowser for help on using the repository browser.