From: Fabian Stelzer Date: Fri, 19 Nov 2021 09:07:55 GMT Subject: Re: [PATCH v2 2/2] test-lib: introduce required prereq for test runs Message-ID: <20211119090755.6noeyarhc3rpzwzx@fs> In-Reply-To: On 18.11.2021 15:42, Junio C Hamano wrote: >Fabian Stelzer writes: > >> + # Abort if this prereq was marked as required >> + if test -n $GIT_TEST_REQUIRE_PREREQ > >If GIT_TEST_REQUIRE_PREREQ is an empty string, this will ask > > test -n > >and "test" will say "yes" (because "-n" is not an empty string). > >Let's surround it with a pair of double-quotes. Will do. Thanks > >> + then >> + case ",$GIT_TEST_REQUIRE_PREREQ," in >> + *,$prerequisite,*) >> + error "required prereq $prerequisite failed" >> + ;; >> + esac >> + fi >> + >> if test -z "$missing_prereq" >> then >> missing_prereq=$prerequisite