X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3400-rebase.sh;h=4314ad2d66d06b411e4bc0c9ee7b07553fc35ac2;hb=e7c2466593f5c8682a4fe7146f17b80acf134675;hp=c5c29ccc4f372723fc77c1af0d7cb7879b92729f;hpb=61c6457e893f568524155b4197a6be076a27ce3d;p=git.git diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index c5c29ccc4..4314ad2d6 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -3,9 +3,10 @@ # Copyright (c) 2005 Amos Waterland # -test_description='git rebase should not destroy author information +test_description='git rebase assorted tests -This test runs git rebase and checks that the author information is not lost. +This test runs git rebase and checks that the author information is not lost +among other things. ' . ./test-lib.sh @@ -133,4 +134,21 @@ test_expect_success 'rebase -q is quiet' ' test ! -s output.out ' +test_expect_success 'Rebase a commit that sprinkles CRs in' ' + ( + echo "One" + echo "TwoQ" + echo "Three" + echo "FQur" + echo "Five" + ) | q_to_cr >CR && + git add CR && + test_tick && + git commit -a -m "A file with a line with CR" && + git tag file-with-cr && + git checkout HEAD^0 && + git rebase --onto HEAD^^ HEAD^ && + git diff --exit-code file-with-cr:CR HEAD:CR +' + test_done