Re: [PATCH v5 05/12] Integrate wildmatch to git
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 14, 2012, 05:06 UTC
- 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 <pclouds@gmail.com> writes:
Show 31 quoted lines
> +++ 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'
> +# "
> + fiHeh, broken can be two-way. Either it may succeed matching what it shouldn't, or it may not match what it should.