From 5db6f9a438432b17df3c33a4f8919b86ed978aad Mon Sep 17 00:00:00 2001 From: Albert Chu Date: Wed, 17 Apr 2024 15:15:12 -0700 Subject: [PATCH] t: add coverage of -L color short option Problem: In several tests the -L (short option of --color) is tested without arguments, but it is not tested with arguments. Add "-Lalways" as an additional test in t1008-kvs-eventlog.t and t2230-job-info-lookup.t. --- t/t1008-kvs-eventlog.t | 2 +- t/t2230-job-info-lookup.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t1008-kvs-eventlog.t b/t/t1008-kvs-eventlog.t index 70ed1d3ab2dc..c72afa5bb59a 100755 --- a/t/t1008-kvs-eventlog.t +++ b/t/t1008-kvs-eventlog.t @@ -69,7 +69,7 @@ test_expect_success 'flux kvs eventlog get/wait-event reject invalid --color' ' test_must_fail flux kvs eventlog get --color=foo test.human && test_must_fail flux kvs eventlog wait-event --color=foo test.human primus ' -for opt in "-L" "--color" "--color=always"; do +for opt in "-L" "-Lalways" "--color" "--color=always"; do test_expect_success "flux kvs eventlog get $opt forces color on" ' name=notty${opt##--color=} && outfile=color-${name:-default}.out && diff --git a/t/t2230-job-info-lookup.t b/t/t2230-job-info-lookup.t index 668121c04a9f..fb1c742a526b 100755 --- a/t/t2230-job-info-lookup.t +++ b/t/t2230-job-info-lookup.t @@ -255,7 +255,7 @@ test_expect_success 'flux job eventlog/wait-event reject invalid --color' ' test_must_fail flux job eventlog --color=foo $jobid && test_must_fail flux job wait-event --color=foo $jobid ' -for opt in "-L" "--color" "--color=always"; do +for opt in "-L" "-Lalways" "--color" "--color=always"; do test_expect_success "flux job eventlog $opt forces color on" ' name=notty${opt##--color=} && outfile=color-${name:-default}.out &&