diff options
Diffstat (limited to 'src/streaming.zig')
| -rw-r--r-- | src/streaming.zig | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/streaming.zig b/src/streaming.zig index bfb4045..99eaecb 100644 --- a/src/streaming.zig +++ b/src/streaming.zig | |||
| @@ -212,9 +212,9 @@ fn testNoErr(params: []const clap.Param(u8), args_strings: []const []const u8, r | |||
| 212 | 212 | ||
| 213 | test "clap.streaming.StreamingClap: short params" { | 213 | test "clap.streaming.StreamingClap: short params" { |
| 214 | const params = []clap.Param(u8){ | 214 | const params = []clap.Param(u8){ |
| 215 | clap.Param(u8).init(0, false, clap.Names.short('a')), | 215 | clap.Param(u8).flag(0, clap.Names.short('a')), |
| 216 | clap.Param(u8).init(1, false, clap.Names.short('b')), | 216 | clap.Param(u8).flag(1, clap.Names.short('b')), |
| 217 | clap.Param(u8).init(2, true, clap.Names.short('c')), | 217 | clap.Param(u8).option(2, clap.Names.short('c')), |
| 218 | }; | 218 | }; |
| 219 | 219 | ||
| 220 | const a = ¶ms[0]; | 220 | const a = ¶ms[0]; |
| @@ -247,9 +247,9 @@ test "clap.streaming.StreamingClap: short params" { | |||
| 247 | 247 | ||
| 248 | test "clap.streaming.StreamingClap: long params" { | 248 | test "clap.streaming.StreamingClap: long params" { |
| 249 | const params = []clap.Param(u8){ | 249 | const params = []clap.Param(u8){ |
| 250 | clap.Param(u8).init(0, false, clap.Names.long("aa")), | 250 | clap.Param(u8).flag(0, clap.Names.long("aa")), |
| 251 | clap.Param(u8).init(1, false, clap.Names.long("bb")), | 251 | clap.Param(u8).flag(1, clap.Names.long("bb")), |
| 252 | clap.Param(u8).init(2, true, clap.Names.long("cc")), | 252 | clap.Param(u8).option(2, clap.Names.long("cc")), |
| 253 | }; | 253 | }; |
| 254 | 254 | ||
| 255 | const aa = ¶ms[0]; | 255 | const aa = ¶ms[0]; |
| @@ -273,7 +273,7 @@ test "clap.streaming.StreamingClap: long params" { | |||
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | test "clap.streaming.StreamingClap: positional params" { | 275 | test "clap.streaming.StreamingClap: positional params" { |
| 276 | const params = []clap.Param(u8){clap.Param(u8).init(0, true, clap.Names.positional())}; | 276 | const params = []clap.Param(u8){clap.Param(u8).positional(0)}; |
| 277 | 277 | ||
| 278 | testNoErr( | 278 | testNoErr( |
| 279 | params, | 279 | params, |
| @@ -287,19 +287,19 @@ test "clap.streaming.StreamingClap: positional params" { | |||
| 287 | 287 | ||
| 288 | test "clap.streaming.StreamingClap: all params" { | 288 | test "clap.streaming.StreamingClap: all params" { |
| 289 | const params = []clap.Param(u8){ | 289 | const params = []clap.Param(u8){ |
| 290 | clap.Param(u8).init(0, false, clap.Names{ | 290 | clap.Param(u8).flag(0, clap.Names{ |
| 291 | .short = 'a', | 291 | .short = 'a', |
| 292 | .long = "aa", | 292 | .long = "aa", |
| 293 | }), | 293 | }), |
| 294 | clap.Param(u8).init(1, false, clap.Names{ | 294 | clap.Param(u8).flag(1, clap.Names{ |
| 295 | .short = 'b', | 295 | .short = 'b', |
| 296 | .long = "bb", | 296 | .long = "bb", |
| 297 | }), | 297 | }), |
| 298 | clap.Param(u8).init(2, true, clap.Names{ | 298 | clap.Param(u8).option(2, clap.Names{ |
| 299 | .short = 'c', | 299 | .short = 'c', |
| 300 | .long = "cc", | 300 | .long = "cc", |
| 301 | }), | 301 | }), |
| 302 | clap.Param(u8).init(3, true, clap.Names.positional()), | 302 | clap.Param(u8).positional(3), |
| 303 | }; | 303 | }; |
| 304 | 304 | ||
| 305 | const aa = ¶ms[0]; | 305 | const aa = ¶ms[0]; |