git-prompt: use here-doc instead of here-string
[git/gitster.git] / t / t3408-rebase-multi-line.sh
blob7b4607d72f2748df9d0800a5e471e4af1d6ae32a
1 #!/bin/sh
3 test_description='rebasing a commit with multi-line first paragraph.'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8 TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
11 test_expect_success setup '
13 >file &&
14 git add file &&
15 test_tick &&
16 git commit -m initial &&
18 echo hello >file &&
19 test_tick &&
20 git commit -a -m "A sample commit log message that has a long
21 summary that spills over multiple lines.
23 But otherwise with a sane description." &&
25 git branch side &&
27 git reset --hard HEAD^ &&
28 >elif &&
29 git add elif &&
30 test_tick &&
31 git commit -m second &&
33 git checkout -b side2 &&
34 >afile &&
35 git add afile &&
36 test_tick &&
37 git commit -m third &&
38 echo hello >afile &&
39 test_tick &&
40 git commit -a -m fourth &&
41 git checkout -b side-merge &&
42 git reset --hard HEAD^^ &&
43 git merge --no-ff -m "A merge commit log message that has a long
44 summary that spills over multiple lines.
46 But otherwise with a sane description." side2 &&
47 git branch side-merge-original
50 test_expect_success rebase '
52 git checkout side &&
53 git rebase main &&
54 git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
55 git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect &&
56 test_cmp expect actual
59 test_done