Re: [PATCH v2 1/3] test-lib: allow selecting tests by substring/regex with --run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Elijah Newren <newren@xxxxxxxxx> writes:

> On Wed, Oct 14, 2020 at 10:57 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>
>> > are you suggesting dropping the regex handling and limit it to
>> > substring matching?  In either case, does using expr save us anything
>> > (isn't expr a shell command)?
>>
>> I had something along this line in mind, not to do a regex but a glob.
>>
>> case "$title" in $selector) found=1 ;; esac
>
> Interesting.  Since it needs to handle substring searching (e.g.
> ./test-script.sh --run=setup,rename), I think this would need to be
> tweaked to be
>    case "$title" in *${selector}*) include=$positive ;; esac

Yup, of course we need to un-anchor with surrounding asterisks.
Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux