'
test_expect_success 'sink default without applied patches' '
- ! stg sink
+ command_error stg sink
'
test_expect_success 'sink and reorder specified without applied patches' '
stg sink p2 p1 &&
- test "$(echo $(stg applied))" = "p2 p1"
+ test "$(echo $(stg series --applied --noprefix))" = "p2 p1"
'
test_expect_success 'sink patches to the bottom of the stack' '
stg sink p4 p3 p2 &&
- test "$(echo $(stg applied))" = "p4 p3 p2 p1"
+ test "$(echo $(stg series --applied --noprefix))" = "p4 p3 p2 p1"
'
test_expect_success 'sink current below a target' '
stg sink --to=p2 &&
- test "$(echo $(stg applied))" = "p4 p3 p1 p2"
+ test "$(echo $(stg series --applied --noprefix))" = "p4 p3 p1 p2"
'
test_expect_success 'bring patches forward' '
stg sink --to=p2 p3 p4 &&
- test "$(echo $(stg applied))" = "p1 p3 p4 p2"
+ test "$(echo $(stg series --applied --noprefix))" = "p1 p3 p4 p2"
'
test_expect_success 'sink specified patch below a target' '
stg sink --to=p3 p2 &&
- test "$(echo $(stg applied))" = "p1 p2 p3 p4"
+ test "$(echo $(stg series --applied --noprefix))" = "p1 p2 p3 p4"
'
test_expect_success 'sink with conflict' '
- ! stg sink --to=p2 p22 &&
- test "$(echo $(stg applied))" = "p1 p22" &&
+ conflict_old stg sink --to=p2 p22 &&
+ test "$(echo $(stg series --applied --noprefix))" = "p1 p22" &&
test "$(echo $(stg status -c))" = "f2"
'