como 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html>
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.6
9
+ &mdash; Documentation by YARD 0.9.16
10
10
 
11
11
  </title>
12
12
 
@@ -15,9 +15,8 @@
15
15
  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
18
+ pathId = "";
19
19
  relpath = '';
20
- framesUrl = "frames.html#!top-level-namespace.html";
21
20
  </script>
22
21
 
23
22
 
@@ -28,58 +27,56 @@
28
27
 
29
28
  </head>
30
29
  <body>
31
- <div id="header">
32
- <div id="menu">
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
33
38
 
34
39
  <a href="_index.html">Index</a> &raquo;
35
40
 
36
41
 
37
42
  <span class="title">Top Level Namespace</span>
38
43
 
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
44
  </div>
42
45
 
43
- <div id="search">
46
+ <div id="search">
44
47
 
45
48
  <a class="full_list_link" id="class_list_link"
46
49
  href="class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="file_list.html">
57
- File List
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
58
56
  </a>
59
57
 
60
58
  </div>
61
- <div class="clear"></div>
62
- </div>
59
+ <div class="clear"></div>
60
+ </div>
63
61
 
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Top Level Namespace
62
+ <div id="content"><h1>Top Level Namespace
67
63
 
68
64
 
69
65
 
70
66
  </h1>
67
+ <div class="box_info">
68
+
71
69
 
72
- <dl class="box">
73
70
 
74
71
 
75
-
76
72
 
77
-
78
73
 
79
74
 
75
+
80
76
 
81
- </dl>
82
- <div class="clear"></div>
77
+
78
+
79
+ </div>
83
80
 
84
81
  <h2>Defined Under Namespace</h2>
85
82
  <p class="children">
@@ -102,11 +99,12 @@
102
99
 
103
100
  </div>
104
101
 
105
- <div id="footer">
106
- Generated on Fri Feb 17 00:05:17 2017 by
102
+ <div id="footer">
103
+ Generated on Sat Sep 29 19:17:49 2018 by
107
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
- 0.8.7.6 (ruby-2.3.3).
105
+ 0.9.16 (ruby-2.5.1).
109
106
  </div>
110
107
 
108
+ </div>
111
109
  </body>
112
110
  </html>
data/lib/como.rb CHANGED
@@ -253,6 +253,7 @@
253
253
  # switches.
254
254
  # * Generate Usage Help printout.
255
255
  #
256
+ #
256
257
  # == Option types
257
258
  #
258
259
  # The following types can be defined for the command line options:
@@ -260,10 +261,14 @@
260
261
  # separately.
261
262
  # [:switch] Single switch option (no arguments).
262
263
  # [:single] Mandatory single argument option.
264
+ # [:comp] Mandatory single argument option (multiple times). Option
265
+ # values in array.
263
266
  # [:multi] Mandatory multiple argument option (one or many). Option
264
267
  # values in array.
265
268
  # [:opt_single] Optional single argument option. Value is nil when
266
269
  # option is not given.
270
+ # [:opt_comp] Optional single argument option (multiple times). Value
271
+ # is nil when option is not given.
267
272
  # [:opt_multi] Optional multiple argument option (one or many). Option
268
273
  # values in array.
269
274
  # [:opt_any] Optional multiple argument option (also none
@@ -291,9 +296,12 @@
291
296
  #
292
297
  # ":multi", ":opt_multi", and ":opt_any" option arguments are
293
298
  # terminated only when an option specifier is found. This can be a
294
- # problem if ":default" option follows. The recommended solution is to
295
- # use a ":silent" option that can be used to terminate the argument
296
- # list. For example:
299
+ # problem if ":default" option follows. There are two simple solutions
300
+ # to this issue. ":comp" option takes only one argument per given
301
+ # switch, and hence is not ambiguous towards ":default"
302
+ # option. Another possibility is to use a ":silent" option that can be
303
+ # used to terminate the argument list. For example:
304
+ #
297
305
  # [ :silent, "terminator", "-", "The terminator." ],
298
306
  #
299
307
  #
@@ -307,6 +315,7 @@
307
315
  # [:none] No arguments (i.e. switch).
308
316
  # [:one] One argument.
309
317
  # [:many] More than one argument.
318
+ # [:repeat] Option can be repeated.
310
319
  # [:opt] Optional argument(s).
311
320
  # [:default] Default option.
312
321
  # [:mutex] Mutually exclusive option.
@@ -316,13 +325,15 @@
316
325
  #
317
326
  # [:switch] :none, :opt
318
327
  # [:single] :one
319
- # [:multi] :one, :many
328
+ # [:comp] :one, :repeat
329
+ # [:multi] :one, :many, :repeat
320
330
  # [:opt_single] :one, :opt
321
- # [:opt_multi] :one, :many, :opt
322
- # [:opt_any] :none, :one, :many, :opt
331
+ # [:opt_comp] :one, :repeat, :opt
332
+ # [:opt_multi] :one, :many, :repeat, :opt
333
+ # [:opt_any] :none, :one, :many, :repeat, :opt
323
334
  # [:default] :none, :one, :many, :opt, :default
324
335
  # [:exclusive] :none, :one, :many, :opt, :mutex
325
- # [:silent] :none, :opt, :hidden
336
+ # [:silent] :none, :opt, :hidden, :repeat
326
337
  #
327
338
  # Primitives can be used in place of types if exotic options are
328
339
  # needed. Instead of a single Symbol an Array of primitives are given
@@ -334,6 +345,7 @@
334
345
  # Como does not check the primitive combinations, thus care and
335
346
  # consideration should be applied.
336
347
  #
348
+ #
337
349
  # == Option specification method configuration
338
350
  #
339
351
  # Option behavior can be controlled with several configuration options.
@@ -399,6 +411,7 @@
399
411
  # Opt['many_files_or_none'].value.length
400
412
  # And finally decide what to do.
401
413
  #
414
+ #
402
415
  # == Options including parameters
403
416
  #
404
417
  # Sometimes it is convenient for the program to use an option to
@@ -411,6 +424,7 @@
411
424
  # And a Hash is returned:
412
425
  # { 'rounds' => 10, 'length' => 5 }
413
426
  #
427
+ #
414
428
  # == Subcommand options
415
429
  #
416
430
  # The given subcommand for the parent command is return by
@@ -420,6 +434,7 @@
420
434
  # if Opt['como_subcmd']['add'].given
421
435
  # ...
422
436
  #
437
+ #
423
438
  # == Program external options
424
439
  #
425
440
  # If the user gives the "--" option (double-dash), the arguments after
@@ -791,6 +806,8 @@ module Como
791
806
  :one,
792
807
  # More than one argument.
793
808
  :many,
809
+ # Option can be repeated.
810
+ :repeat,
794
811
  # Optional argument(s).
795
812
  :opt,
796
813
  # Default option.
@@ -805,13 +822,15 @@ module Como
805
822
  MAP_TYPE_PRIMS = {
806
823
  :switch => [ :none, :opt ],
807
824
  :single => [ :one ],
808
- :multi => [ :one, :many ],
825
+ :comp => [ :one, :repeat ],
826
+ :multi => [ :one, :many, :repeat ],
809
827
  :opt_single => [ :one, :opt ],
810
- :opt_multi => [ :one, :many, :opt ],
811
- :opt_any => [ :none, :one, :many, :opt ],
828
+ :opt_comp => [ :one, :repeat, :opt ],
829
+ :opt_multi => [ :one, :many, :repeat, :opt ],
830
+ :opt_any => [ :none, :one, :many, :repeat, :opt ],
812
831
  :default => [ :none, :one, :many, :opt, :default ],
813
832
  :exclusive => [ :none, :one, :many, :opt, :mutex ],
814
- :silent => [ :none, :opt, :hidden ],
833
+ :silent => [ :none, :opt, :repeat, :hidden ],
815
834
  }
816
835
 
817
836
 
@@ -842,7 +861,7 @@ module Como
842
861
  else
843
862
  raise "Invalid option type definition: \"#{type}\"..."
844
863
  end
845
-
864
+
846
865
  prims
847
866
  end
848
867
 
@@ -1105,7 +1124,7 @@ module Como
1105
1124
 
1106
1125
  # Options iterator for all options.
1107
1126
  def Opt.each( &blk )
1108
- Opt.main.each &blk
1127
+ Opt.main.each( &blk )
1109
1128
  end
1110
1129
 
1111
1130
 
@@ -1376,6 +1395,13 @@ module Como
1376
1395
 
1377
1396
  else
1378
1397
 
1398
+ if o.given && !o.prim?( :repeat )
1399
+ raise \
1400
+ InvalidOption.new(
1401
+ "Option specified too multiple times (\"#{o.name}\")...",
1402
+ self )
1403
+ end
1404
+
1379
1405
  if o.prim?( :many )
1380
1406
 
1381
1407
  # Get all argument for multi-option.
@@ -1389,14 +1415,13 @@ module Como
1389
1415
 
1390
1416
  # Get one argument for single-option.
1391
1417
 
1392
- if o.given
1393
- raise \
1394
- InvalidOption.new(
1395
- "Too many arguments for option (\"#{o.name}\")...",
1396
- self )
1418
+ if o.prim?( :repeat )
1419
+ o.value = [] if !o.given
1420
+ o.value.push args.toValue
1397
1421
  else
1398
1422
  o.value = args.toValue
1399
1423
  end
1424
+
1400
1425
  args.next
1401
1426
  end
1402
1427
  end
@@ -1839,6 +1864,8 @@ module Como
1839
1864
  prural = nil
1840
1865
  if o.prim?( :none ) && o.prim?( :many )
1841
1866
  prural = "*"
1867
+ elsif o.prim?( :one ) && !o.prim?( :many ) && o.prim?( :repeat )
1868
+ prural = "#"
1842
1869
  elsif o.prim?( :one ) && o.prim?( :many )
1843
1870
  prural = "+"
1844
1871
  else
@@ -1985,7 +2012,7 @@ module Como
1985
2012
  # Custom check for the option. User has to know some Como
1986
2013
  # internals.
1987
2014
  def evalCheck( &check )
1988
- instance_eval &check
2015
+ instance_eval( &check )
1989
2016
  end
1990
2017
 
1991
2018
 
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Como
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  def Como.version
4
4
  Como::VERSION
5
5
  end
data/test/como_options CHANGED
@@ -7,6 +7,7 @@ Spec.command( "como_options", "Como Tester", "2013",
7
7
  [
8
8
  [ :exclusive, "doc", nil, "Documentation for option\n\twith too much description\n\tfor one line." ],
9
9
  [ :single, "file", "-f", "File argument." ],
10
+ [ :opt_comp, "attributes", "-a", "Attributes." ],
10
11
  [ :switch, "debug", nil, "Enable debugging." ],
11
12
  [ :opt_single, "mode", "-m", "Mode." ],
12
13
  [ :opt_multi, "params", nil, "Parameters." ],
data/test/como_type_prim CHANGED
@@ -9,8 +9,8 @@ Spec.command( "como_type_prim", "Como Tester", "2013",
9
9
  [ [ :one ], "file", "-f", "File argument." ],
10
10
  [ :switch, "debug", nil, "Enable debugging." ],
11
11
  [ [ :one, :opt ], "mode", "-m", "Mode." ],
12
- [ [ :one, :many, :opt ], "params", nil, "Parameters." ],
13
- [ [ :none, :one, :many, :opt ], "types", "-t", "Types." ],
12
+ [ [ :one, :many, :repeat, :opt ], "params", nil, "Parameters." ],
13
+ [ [ :none, :one, :many, :repeat, :opt ], "types", "-t", "Types." ],
14
14
  [ [ :none, :opt, :hidden ], "terminator", "-", "The terminator." ],
15
15
  [ [ :one, :many ], "dir", "-d", "Directory argument(s)." ],
16
16
  [ :default, "Leftovers." ],
@@ -2,12 +2,13 @@
2
2
 
3
3
  como_options error: Option "-f" missing for "como_options"...
4
4
 
5
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
5
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
6
6
 
7
7
  --doc Documentation for option
8
8
  with too much description
9
9
  for one line.
10
10
  -f File argument.
11
+ -a Attributes.
11
12
  --debug Enable debugging.
12
13
  -m Mode.
13
14
  --params Parameters.
@@ -23,6 +24,7 @@ Given "help": false
23
24
  Given "doc": true
24
25
  Value "doc": []
25
26
  Given "file": false
27
+ Given "attributes": false
26
28
  Given "debug": false
27
29
  Given "mode": false
28
30
  Given "params": false
@@ -34,12 +36,13 @@ Given "<default>": false
34
36
 
35
37
  como_options error: No argument given for "-f"...
36
38
 
37
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
39
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
38
40
 
39
41
  --doc Documentation for option
40
42
  with too much description
41
43
  for one line.
42
44
  -f File argument.
45
+ -a Attributes.
43
46
  --debug Enable debugging.
44
47
  -m Mode.
45
48
  --params Parameters.
@@ -56,6 +59,7 @@ Given "doc": true
56
59
  Value "doc": []
57
60
  Given "file": true
58
61
  Value "file": foo
62
+ Given "attributes": false
59
63
  Given "debug": false
60
64
  Given "mode": false
61
65
  Given "params": false
@@ -67,12 +71,13 @@ Given "<default>": false
67
71
 
68
72
  como_options error: No argument given for "-f"...
69
73
 
70
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
74
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
71
75
 
72
76
  --doc Documentation for option
73
77
  with too much description
74
78
  for one line.
75
79
  -f File argument.
80
+ -a Attributes.
76
81
  --debug Enable debugging.
77
82
  -m Mode.
78
83
  --params Parameters.
@@ -87,12 +92,13 @@ como_options error: No argument given for "-f"...
87
92
 
88
93
  como_options error: Option "-d" missing for "como_options"...
89
94
 
90
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
95
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
91
96
 
92
97
  --doc Documentation for option
93
98
  with too much description
94
99
  for one line.
95
100
  -f File argument.
101
+ -a Attributes.
96
102
  --debug Enable debugging.
97
103
  -m Mode.
98
104
  --params Parameters.
@@ -107,12 +113,13 @@ como_options error: Option "-d" missing for "como_options"...
107
113
 
108
114
  como_options error: No argument given for "-d"...
109
115
 
110
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
116
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
111
117
 
112
118
  --doc Documentation for option
113
119
  with too much description
114
120
  for one line.
115
121
  -f File argument.
122
+ -a Attributes.
116
123
  --debug Enable debugging.
117
124
  -m Mode.
118
125
  --params Parameters.
@@ -128,6 +135,7 @@ Given "help": false
128
135
  Given "doc": false
129
136
  Given "file": true
130
137
  Value "file": dii
138
+ Given "attributes": false
131
139
  Given "debug": false
132
140
  Given "mode": false
133
141
  Given "params": false
@@ -141,6 +149,7 @@ Given "help": false
141
149
  Given "doc": false
142
150
  Given "file": true
143
151
  Value "file": dii
152
+ Given "attributes": false
144
153
  Given "debug": false
145
154
  Given "mode": false
146
155
  Given "params": false
@@ -154,6 +163,7 @@ Given "help": false
154
163
  Given "doc": false
155
164
  Given "file": true
156
165
  Value "file": dii
166
+ Given "attributes": false
157
167
  Given "debug": true
158
168
  Given "mode": false
159
169
  Given "params": false
@@ -167,6 +177,7 @@ Given "help": false
167
177
  Given "doc": false
168
178
  Given "file": true
169
179
  Value "file": dii
180
+ Given "attributes": false
170
181
  Given "debug": true
171
182
  Given "mode": false
172
183
  Given "params": false
@@ -180,6 +191,7 @@ Given "help": false
180
191
  Given "doc": false
181
192
  Given "file": true
182
193
  Value "file": dii
194
+ Given "attributes": false
183
195
  Given "debug": true
184
196
  Given "mode": true
185
197
  Value "mode": foo
@@ -194,6 +206,7 @@ Given "help": false
194
206
  Given "doc": false
195
207
  Given "file": true
196
208
  Value "file": dii
209
+ Given "attributes": false
197
210
  Given "debug": true
198
211
  Given "mode": true
199
212
  Value "mode": foo
@@ -208,6 +221,7 @@ Given "help": false
208
221
  Given "doc": false
209
222
  Given "file": true
210
223
  Value "file": dii
224
+ Given "attributes": false
211
225
  Given "debug": false
212
226
  Given "mode": false
213
227
  Given "params": true
@@ -222,6 +236,7 @@ Given "help": false
222
236
  Given "doc": false
223
237
  Given "file": true
224
238
  Value "file": dii
239
+ Given "attributes": false
225
240
  Given "debug": false
226
241
  Given "mode": false
227
242
  Given "params": true
@@ -237,6 +252,7 @@ Given "help": false
237
252
  Given "doc": false
238
253
  Given "file": true
239
254
  Value "file": dii
255
+ Given "attributes": false
240
256
  Given "debug": false
241
257
  Given "mode": false
242
258
  Given "params": true
@@ -252,6 +268,7 @@ Given "help": false
252
268
  Given "doc": false
253
269
  Given "file": true
254
270
  Value "file": dii
271
+ Given "attributes": false
255
272
  Given "debug": false
256
273
  Given "mode": false
257
274
  Given "params": true
@@ -267,6 +284,7 @@ Given "help": false
267
284
  Given "doc": false
268
285
  Given "file": true
269
286
  Value "file": dii
287
+ Given "attributes": false
270
288
  Given "debug": false
271
289
  Given "mode": false
272
290
  Given "params": true
@@ -282,6 +300,7 @@ Given "help": false
282
300
  Given "doc": false
283
301
  Given "file": true
284
302
  Value "file": dii
303
+ Given "attributes": false
285
304
  Given "debug": false
286
305
  Given "mode": false
287
306
  Given "params": true
@@ -297,6 +316,7 @@ Given "help": false
297
316
  Given "doc": false
298
317
  Given "file": true
299
318
  Value "file": dii
319
+ Given "attributes": false
300
320
  Given "debug": false
301
321
  Given "mode": false
302
322
  Given "params": true
@@ -313,6 +333,7 @@ Given "help": false
313
333
  Given "doc": false
314
334
  Given "file": true
315
335
  Value "file": dii
336
+ Given "attributes": false
316
337
  Given "debug": false
317
338
  Given "mode": false
318
339
  Given "params": false
@@ -328,12 +349,13 @@ External: ["external", "arguments"]
328
349
 
329
350
  como_options error: Option "-d" missing for "como_options"...
330
351
 
331
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
352
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
332
353
 
333
354
  --doc Documentation for option
334
355
  with too much description
335
356
  for one line.
336
357
  -f File argument.
358
+ -a Attributes.
337
359
  --debug Enable debugging.
338
360
  -m Mode.
339
361
  --params Parameters.
@@ -348,12 +370,13 @@ como_options error: Option "-d" missing for "como_options"...
348
370
 
349
371
  como_options error: Option "-d" missing for "como_options"...
350
372
 
351
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
373
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
352
374
 
353
375
  --doc Documentation for option
354
376
  with too much description
355
377
  for one line.
356
378
  -f File argument.
379
+ -a Attributes.
357
380
  --debug Enable debugging.
358
381
  -m Mode.
359
382
  --params Parameters.
@@ -368,12 +391,13 @@ como_options error: Option "-d" missing for "como_options"...
368
391
 
369
392
  como_options error: Unknown option "-q"...
370
393
 
371
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
394
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
372
395
 
373
396
  --doc Documentation for option
374
397
  with too much description
375
398
  for one line.
376
399
  -f File argument.
400
+ -a Attributes.
377
401
  --debug Enable debugging.
378
402
  -m Mode.
379
403
  --params Parameters.
@@ -388,12 +412,13 @@ como_options error: Unknown option "-q"...
388
412
 
389
413
  como_options error: No argument given for "-d"...
390
414
 
391
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
415
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
392
416
 
393
417
  --doc Documentation for option
394
418
  with too much description
395
419
  for one line.
396
420
  -f File argument.
421
+ -a Attributes.
397
422
  --debug Enable debugging.
398
423
  -m Mode.
399
424
  --params Parameters.
@@ -409,6 +434,7 @@ Given "help": false
409
434
  Given "doc": false
410
435
  Given "file": true
411
436
  Value "file": foo
437
+ Given "attributes": false
412
438
  Given "debug": false
413
439
  Given "mode": false
414
440
  Given "params": false
@@ -419,12 +445,13 @@ Value "dir": ["dir"]
419
445
  Given "<default>": false
420
446
  ---- CMD: como_options -f foo -d dir -h
421
447
 
422
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
448
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
423
449
 
424
450
  --doc Documentation for option
425
451
  with too much description
426
452
  for one line.
427
453
  -f File argument.
454
+ -a Attributes.
428
455
  --debug Enable debugging.
429
456
  -m Mode.
430
457
  --params Parameters.
@@ -437,12 +464,13 @@ Given "<default>": false
437
464
 
438
465
  ---- CMD: como_options -h -f foo -d dir
439
466
 
440
- como_options [--doc <doc>*] -f <file> [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
467
+ como_options [--doc <doc>*] -f <file> [-a <attributes>#] [--debug] [-m <mode>] [--params <params>+] [-t <types>*] -d <dir>+ [<default>]
441
468
 
442
469
  --doc Documentation for option
443
470
  with too much description
444
471
  for one line.
445
472
  -f File argument.
473
+ -a Attributes.
446
474
  --debug Enable debugging.
447
475
  -m Mode.
448
476
  --params Parameters.
@@ -458,6 +486,7 @@ Given "help": false
458
486
  Given "doc": true
459
487
  Value "doc": ["doc1", "doc2"]
460
488
  Given "file": false
489
+ Given "attributes": false
461
490
  Given "debug": false
462
491
  Given "mode": false
463
492
  Given "params": false
@@ -465,3 +494,34 @@ Given "types": false
465
494
  Given "terminator": false
466
495
  Given "dir": false
467
496
  Given "<default>": false
497
+ ---- CMD: como_options -a foo -a bar -d d1 -a hii -f dii -a duu
498
+ Given "help": false
499
+ Given "doc": false
500
+ Given "file": true
501
+ Value "file": dii
502
+ Given "attributes": true
503
+ Value "attributes": ["foo", "bar", "hii", "duu"]
504
+ Given "debug": false
505
+ Given "mode": false
506
+ Given "params": false
507
+ Given "types": false
508
+ Given "terminator": false
509
+ Given "dir": true
510
+ Value "dir": ["d1"]
511
+ Given "<default>": false
512
+ ---- CMD: como_options -a foo -a bar -d d1 -a hii -f dii -a duu haa
513
+ Given "help": false
514
+ Given "doc": false
515
+ Given "file": true
516
+ Value "file": dii
517
+ Given "attributes": true
518
+ Value "attributes": ["foo", "bar", "hii", "duu"]
519
+ Given "debug": false
520
+ Given "mode": false
521
+ Given "params": false
522
+ Given "types": false
523
+ Given "terminator": false
524
+ Given "dir": true
525
+ Value "dir": ["d1"]
526
+ Given "<default>": true
527
+ Value "<default>": ["haa"]