bash prompt: add a test for symbolic link symbolic refs

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
This commit is contained in:
SZEDER Gábor 2012-08-24 19:52:48 +02:00
parent c9a102e81f
commit 868dc1acec

View File

@ -40,6 +40,15 @@ test_expect_success 'prompt - branch name' '
test_cmp expected "$actual"
'
test_expect_success SYMLINKS 'prompt - branch name - symlink symref' '
printf " (master)" >expected &&
test_when_finished "git checkout master" &&
test_config core.preferSymlinkRefs true &&
git checkout master &&
__git_ps1 >"$actual" &&
test_cmp expected "$actual"
'
test_expect_success 'prompt - detached head' '
printf " ((%s...))" $(git log -1 --format="%h" b1^) >expected &&
git checkout b1^ &&