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

Re: [PATCH v4 00/12] Wildmatch v4

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:55:00
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help