From: Junio C Hamano Date: Sun, 14 Oct 2012 05:06:22 GMT Subject: Re: [PATCH v5 05/12] Integrate wildmatch to git Message-ID: <7vlif9zl2n.fsf@alter.siamese.dyndns.org> In-Reply-To: <1350182110-25936-6-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > +++ b/t/t3070-wildmatch.sh > @@ -0,0 +1,188 @@ > +#!/bin/sh > + > +test_description='wildmatch tests' > + > +. ./test-lib.sh > + > +match() { > + if [ $1 = 1 ]; then > + test_expect_success "wildmatch: match '$3' '$4'" " > + test-wildmatch wildmatch '$3' '$4' > + " > + else > + test_expect_success "wildmatch: no match '$3' '$4'" " > + ! test-wildmatch wildmatch '$3' '$4' > + " > + fi > + if [ $2 = 1 ]; then > + test_expect_success "fnmatch: match '$3' '$4'" " > + test-wildmatch fnmatch '$3' '$4' > + " > + elif [ $2 = 0 ]; then > + test_expect_success "fnmatch: no match '$3' '$4'" " > + ! test-wildmatch fnmatch '$3' '$4' > + " > +# else > +# test_expect_success BROKEN_FNMATCH "fnmatch: '$3' '$4'" " > +# ! test-wildmatch fnmatch '$3' '$4' > +# " > + fi Heh, broken can be two-way. Either it may succeed matching what it shouldn't, or it may not match what it should.