t1512: test ambiguous cat-file --batch and --batch-output
Test the new "ambiguous" result from cat-file --batch and --batch-check. This is in t1512 instead of t1006 since we need a repo with ambiguous object_id names. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Wong committed
Jan 30, 2019 at 21:33 UTC
df799f5d99ac51d4fc791d546de3f936088582fc
1 file changed
+10
t/t1512-rev-parse-disambiguation.sh
+10
@@ -388,4 +388,14 @@ test_expect_success C_LOCALE_OUTPUT 'ambiguous commits are printed by type first
388
done
389
'
390
391
+test_expect_success 'cat-file --batch and --batch-check show ambiguous' '
392
+ echo "0000 ambiguous" >expect &&
393
+ echo 0000 | git cat-file --batch-check >actual 2>err &&
394
+ test_cmp expect actual &&
395
+ test_i18ngrep hint: err &&
396
+ echo 0000 | git cat-file --batch >actual 2>err &&
397
+ test_cmp expect actual &&
398
+ test_i18ngrep hint: err
399
+'
400
+
401
test_done