Thread (39 messages) flat view 39 messages, 6 authors, 2016-06-15

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

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:47

Ævar Arnfjörð Bjarmason wrote:
On Thu, Oct 14, 2010 at 20:40, Jonathan Nieder [off-list ref] wrote:
quoted
+       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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help