Re: [PATCH v4 00/12] Wildmatch v4
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Oct 13, 2012, 03:49 UTC
- Message-ID
- <20121013034934.GA27791@do>
- In-Reply-To
- <7vbog74o59.fsf@alter.siamese.dyndns.org>
On Fri, Oct 12, 2012 at 10:05:06AM -0700, Junio C Hamano wrote:
> Nguyen, how about updating the match () shell function in 3070 so > that it not just says not-ok, but indicates what failed (wildmatch > failed, or wildmatch passed but fnmatch failed), at least when the > test is run as "./t3070-*.sh -v -i"?
You could squash this to the "Integrate wildmatch to git" patch, or just put it at the end of the series (I'll need to send a series update anyway). This splits fnmatch and wildmatch tests separately so we can easily identify which one fails.
-- 8< --
diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh index c3ee729..4f97923 100755 --- a/t/t3070-wildmatch.sh +++ b/t/t3070-wildmatch.sh @@ -5,20 +5,28 @@ test_description='wildmatch tests' . ./test-lib.sh match() { - test_expect_success "wildmatch $*" " - if [ $1 = 1 ]; then + if [ $1 = 1 ]; then + test_expect_success "wildmatch: match $3 $4" " test-wildmatch wildmatch '$3' '$4' - else + " + else + test_expect_success "wildmatch: no match $3 $4" " ! test-wildmatch wildmatch '$3' '$4' - fi && - if [ $2 = 1 ]; then + " + fi + if [ $2 = 1 ]; then + test_expect_success "fnmatch: match $3 $4" " test-wildmatch fnmatch '$3' '$4' - elif [ $2 = x ]; then - true - else + " + elif [ $2 = 0 ]; then + test_expect_success "fnmatch: no match $3 $4" " ! test-wildmatch fnmatch '$3' '$4' - fi - " + " +# else +# test_expect_success BROKEN_FNMATCH "fnmatch: $3 $4" " +# test-wildmatch fnmatch '$3' '$4' +# " + fi } # Basic wildmat features -- 8< --
-- Duy