diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t3200-branch.sh | 4 | ||||
-rwxr-xr-x | t/t3400-rebase.sh | 34 | ||||
-rwxr-xr-x | t/t5400-send-pack.sh | 10 |
3 files changed, 45 insertions, 3 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 36f7749bed..c3de151942 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -16,8 +16,8 @@ test_expect_success \ git-update-index --add A && git-commit -m "Initial commit."' -test_expect_failure \ - 'git branch --help should return error code' \ +test_expect_success \ + 'git branch --help should return success now.' \ 'git-branch --help' test_expect_failure \ diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh new file mode 100755 index 0000000000..b9d3131cc2 --- /dev/null +++ b/t/t3400-rebase.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Copyright (c) 2005 Amos Waterland +# + +test_description='git rebase should not destroy author information + +This test runs git rebase and checks that the author information is not lost. +' +. ./test-lib.sh + +export GIT_AUTHOR_EMAIL=bogus_email_address + +test_expect_success \ + 'prepare repository with topic branch, then rebase against master' \ + 'echo First > A && + git-update-index --add A && + git-commit -m "Add A." && + git checkout -b my-topic-branch && + echo Second > B && + git-update-index --add B && + git-commit -m "Add B." && + git checkout -f master && + echo Third >> A && + git-update-index A && + git-commit -m "Modify A." && + git checkout -f my-topic-branch && + git rebase master' + +test_expect_failure \ + 'the rebase operation should not have destroyed author information' \ + 'git log | grep "Author:" | grep "<>"' + +test_done diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index 7fc3bd7d3e..f3694ac3c7 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -43,7 +43,15 @@ test_expect_success setup ' test_expect_success \ 'pushing rewound head should not barf but require --force' ' # should not fail but refuse to update. - git-send-pack ./victim/.git/ master && + if git-send-pack ./victim/.git/ master + then + # now it should fail with Pasky patch + echo >&2 Gaah, it should have failed. + false + else + echo >&2 Thanks, it correctly failed. + true + fi && if cmp victim/.git/refs/heads/master .git/refs/heads/master then # should have been left as it was! |