submodule.c: report the submodule that an error occurs in
[gitweb.git] / t / t5510-fetch.sh
index 454d896390c03667442ce12925066b14593b3cd1..3debc87d4aefb2d0d5c77881a9485c06a2908858 100755 (executable)
@@ -222,12 +222,9 @@ test_expect_success 'fetch uses remote ref names to describe new refs' '
        (
                cd descriptive &&
                git fetch o 2>actual &&
-               grep " -> refs/crazyheads/descriptive-branch$" actual |
-               test_i18ngrep "new branch" &&
-               grep " -> descriptive-tag$" actual |
-               test_i18ngrep "new tag" &&
-               grep " -> crazy$" actual |
-               test_i18ngrep "new ref"
+               test_i18ngrep "new branch.* -> refs/crazyheads/descriptive-branch$" actual &&
+               test_i18ngrep "new tag.* -> descriptive-tag$" actual &&
+               test_i18ngrep "new ref.* -> crazy$" actual
        ) &&
        git checkout master
 '
@@ -644,7 +641,7 @@ test_expect_success 'fetch --prune prints the remotes url' '
                git fetch --prune origin 2>&1 | head -n1 >../actual
        ) &&
        echo "From ${D}/." >expect &&
-       test_cmp expect actual
+       test_i18ncmp expect actual
 '
 
 test_expect_success 'branchname D/F conflict resolved by --prune' '
@@ -688,4 +685,34 @@ test_expect_success 'fetching with auto-gc does not lock up' '
        )
 '
 
+test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '
+       git clone . full-output &&
+       test_commit looooooooooooong-tag &&
+       (
+               cd full-output &&
+               git -c fetch.output=full fetch origin 2>&1 | \
+                       grep -e "->" | cut -c 22- >../actual
+       ) &&
+       cat >expect <<-\EOF &&
+       master               -> origin/master
+       looooooooooooong-tag -> looooooooooooong-tag
+       EOF
+       test_cmp expect actual
+'
+
+test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '
+       git clone . compact &&
+       test_commit extraaa &&
+       (
+               cd compact &&
+               git -c fetch.output=compact fetch origin 2>&1 | \
+                       grep -e "->" | cut -c 22- >../actual
+       ) &&
+       cat >expect <<-\EOF &&
+       master     -> origin/*
+       extraaa    -> *
+       EOF
+       test_cmp expect actual
+'
+
 test_done