Code

git-check-attr: test that no output is written to stderr
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 4 Aug 2011 04:47:43 +0000 (06:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 Aug 2011 22:57:17 +0000 (15:57 -0700)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0003-attributes.sh

index 5acb2d5bbd308a741179c09ebe923a4bb16fb032..4f2fbc07810e729abc54872d6d5b2bec11836309 100755 (executable)
@@ -9,9 +9,10 @@ attr_check () {
        path="$1"
        expect="$2"
 
-       git check-attr test -- "$path" >actual &&
+       git check-attr test -- "$path" >actual 2>err &&
        echo "$path: test: $2" >expect &&
-       test_cmp expect actual
+       test_cmp expect actual &&
+       test_line_count = 0 err
 
 }