test-parse-options: print quiet as integer
We would want to see how multiple --quiet options affect the value of the underlying variable (we may want "--quiet --quiet" to still be 1, or we may want to see the value incremented to 2). Show the value as integer to allow us to inspect it. Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pranit Bauva committed
Apr 12, 2016 at 23:02 UTC
36e6a5baf1d45e125fcdb99781a0c6448109b44d
2 files changed
+14
-14
t/t0040-parse-options.sh
+13
-13
@@ -64,7 +64,7 @@ timestamp: 0
64
string: (not set)
65
abbrev: 7
66
verbose: 0
67
-quiet: no
67
+quiet: 0
68
dry run: no
69
file: (not set)
70
EOF
@@ -164,7 +164,7 @@ timestamp: 0
164
string: 123
165
abbrev: 7
166
verbose: 2
167
-quiet: no
167
+quiet: 0
168
dry run: yes
169
file: prefix/my.file
170
EOF
@@ -184,7 +184,7 @@ timestamp: 0
184
string: 321
185
abbrev: 10
186
verbose: 2
187
-quiet: no
187
+quiet: 0
188
dry run: no
189
file: prefix/fi.le
190
EOF
@@ -212,7 +212,7 @@ timestamp: 0
212
string: 123
213
abbrev: 7
214
verbose: 0
215
-quiet: no
215
+quiet: 0
216
dry run: no
217
file: (not set)
218
arg 00: a1
@@ -235,7 +235,7 @@ timestamp: 0
235
string: (not set)
236
abbrev: 7
237
verbose: 0
238
-quiet: no
238
+quiet: 0
239
dry run: no
240
file: (not set)
241
EOF
@@ -264,7 +264,7 @@ timestamp: 0
264
string: 123
265
abbrev: 7
266
verbose: 0
267
-quiet: no
267
+quiet: 0
268
dry run: no
269
file: (not set)
270
EOF
@@ -303,7 +303,7 @@ timestamp: 0
303
string: (not set)
304
abbrev: 7
305
verbose: 0
306
-quiet: no
306
+quiet: 0
307
dry run: no
308
file: (not set)
309
arg 00: --quux
@@ -323,7 +323,7 @@ timestamp: 1
323
string: (not set)
324
abbrev: 7
325
verbose: 0
326
-quiet: yes
326
+quiet: 1
327
dry run: no
328
file: (not set)
329
arg 00: foo
@@ -345,7 +345,7 @@ timestamp: 0
345
string: (not set)
346
abbrev: 7
347
verbose: 0
348
-quiet: no
348
+quiet: 0
349
dry run: no
350
file: (not set)
351
EOF
@@ -374,7 +374,7 @@ timestamp: 0
374
string: (not set)
375
abbrev: 7
376
verbose: 0
377
-quiet: no
377
+quiet: 0
378
dry run: no
379
file: (not set)
380
EOF
@@ -399,7 +399,7 @@ timestamp: 0
399
string: (not set)
400
abbrev: 7
401
verbose: 0
402
-quiet: no
402
+quiet: 0
403
dry run: no
404
file: (not set)
405
EOF
@@ -430,7 +430,7 @@ timestamp: 0
430
string: (not set)
431
abbrev: 7
432
verbose: 0
433
-quiet: no
433
+quiet: 0
434
dry run: no
435
file: (not set)
436
EOF
@@ -449,7 +449,7 @@ timestamp: 0
449
string: (not set)
450
abbrev: 7
451
verbose: 0
452
-quiet: no
452
+quiet: 0
453
dry run: no
454
file: (not set)
455
EOF
test-parse-options.c
+1
-1
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
90
printf("string: %s\n", string ? string : "(not set)");
91
printf("abbrev: %d\n", abbrev);
92
printf("verbose: %d\n", verbose);
93
- printf("quiet: %s\n", quiet ? "yes" : "no");
93
+ printf("quiet: %d\n", quiet);
94
printf("dry run: %s\n", dry_run ? "yes" : "no");
95
printf("file: %s\n", file ? file : "(not set)");
96