Re: [PATCH 1/2] test-lib: allow test code to check the list of declared prerequisites

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

 



Ãvar ArnfjÃrà Bjarmason wrote:
> On Thu, Oct 14, 2010 at 20:40, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:

>> + Â Â Â case ",$test_prereq," in
>> + Â Â Â *,$1,*)
>
> Won't this only work with:
> 
>     test_expect_success FOO,THINGYOUWANT,BAR '...'
> 
> And not:
> 
>     test_expect_success THINGYOUWANT,FOO,BAR '...'
> 
> ?

	$ case ,X,FOO,BAR, in
	  *,X,*)
		echo ok
		;;
	  *)
		echo not ok
		;;
	  esac
	ok
	$

Looks safe to me.  A * can match any string, including the empty string[1].

[1] http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_02
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]