git/t/t6009-rev-list-parent.sh
Jonathan Nieder a48fcd8369 tests: add missing &&
Breaks in a test assertion's && chain can potentially hide
failures from earlier commands in the chain.

Commands intended to fail should be marked with !, test_must_fail, or
test_might_fail.  The examples in this patch do not require that.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-09 11:59:49 -08:00

39 lines
534 B
Bash
Executable File

#!/bin/sh
test_description='properly cull all ancestors'
. ./test-lib.sh
commit () {
test_tick &&
echo $1 >file &&
git commit -a -m $1 &&
git tag $1
}
test_expect_success setup '
touch file &&
git add file &&
commit one &&
test_tick=$(($test_tick - 2400)) &&
commit two &&
commit three &&
commit four &&
git log --pretty=oneline --abbrev-commit
'
test_expect_success 'one is ancestor of others and should not be shown' '
git rev-list one --not four >result &&
>expect &&
test_cmp expect result
'
test_done