2 test_description
='Test that "stg float" can handle conflicts'
5 test_expect_success
'Test setup' '
7 echo expected.txt >> .git/info/exclude &&
8 echo first line > foo.txt &&
11 echo foo >> foo.txt &&
14 echo bar >> bar.txt &&
17 echo foo2 >> foo.txt &&
23 cat > expected.txt
<<EOF
32 test_expect_success
'Float a patch, causing a conflict two patches down' '
33 conflict stg float p1 &&
34 test "$(echo $(stg series))" = "+ p0 + p2 > p3 - p1" &&
35 test "$(stg id p3)" = "$(git rev-list HEAD~0 -n 1)" &&
36 test "$(stg id p2)" = "$(git rev-list HEAD~1 -n 1)" &&
37 test "$(stg id p0)" = "$(git rev-list HEAD~2 -n 1)" &&
38 test "$(stg status)" = "UU foo.txt" &&
39 test_cmp foo.txt expected.txt