Use README.md in setup.py long_description
[stgit.git] / t / t1502-float-conflict-1.sh
blobfb8101a3263daaee50b8e36bc556269342b073f9
1 #!/bin/sh
2 test_description='Test that "stg float" can handle conflicts'
3 . ./test-lib.sh
5 test_expect_success 'Test setup' '
6 stg init &&
7 echo expected.txt >> .git/info/exclude &&
8 echo first line > foo.txt &&
9 git add foo.txt &&
10 git commit -m p0 &&
11 echo foo >> foo.txt &&
12 git add foo.txt &&
13 git commit -m p1 &&
14 echo foo2 >> foo.txt &&
15 git add foo.txt &&
16 git commit -m p2 &&
17 stg uncommit -n 3
20 cat > expected.txt <<EOF
21 first line
22 <<<<<<< current
23 =======
24 foo
25 foo2
26 >>>>>>> patched
27 EOF
29 test_expect_success 'Float a patch, causing a conflict with the next patch' '
30 conflict stg float p1 &&
31 test "$(echo $(stg series))" = "+ p0 > p2 - p1" &&
32 test "$(stg id p2)" = "$(git rev-list HEAD~0 -n 1)" &&
33 test "$(stg id p0)" = "$(git rev-list HEAD~1 -n 1)" &&
34 test "$(stg status)" = "UU foo.txt" &&
35 test_cmp foo.txt expected.txt
38 test_done