test-dir-iterator: do not assume errno values
[gitweb.git] / t / t1512-rev-parse-disambiguation.sh
index 96fe3754c8c96fd65286d4eea44cb65b0edde343..c19fb500cb225273fce730c656fea00a3ada624d 100755 (executable)
@@ -34,8 +34,8 @@ test_expect_success 'blob and tree' '
                for i in 0 1 2 3 4 5 6 7 8 9
                do
                        echo $i
-               done
-               echo
+               done &&
+               echo &&
                echo b1rwzyc3
        ) >a0blgqsjc &&
 
@@ -222,7 +222,7 @@ test_expect_success 'more history' '
 
        test_might_fail git rm -f a0blgqsjc &&
        (
-               git cat-file blob $side:f5518nwu
+               git cat-file blob $side:f5518nwu &&
                echo j3l0i9s6
        ) >ab2gs879 &&
        git add ab2gs879 &&
@@ -388,4 +388,14 @@ test_expect_success C_LOCALE_OUTPUT 'ambiguous commits are printed by type first
        done
 '
 
+test_expect_success 'cat-file --batch and --batch-check show ambiguous' '
+       echo "0000 ambiguous" >expect &&
+       echo 0000 | git cat-file --batch-check >actual 2>err &&
+       test_cmp expect actual &&
+       test_i18ngrep hint: err &&
+       echo 0000 | git cat-file --batch >actual 2>err &&
+       test_cmp expect actual &&
+       test_i18ngrep hint: err
+'
+
 test_done