3 # Copyright (c) 2008 Onno Kortmann
4 # Parts taken from the other test scripts
8 test_description
='stg rename test
10 Tests some parts of the stg rename command.'
15 test_expect_success
'Rename in empty' '
16 command_error stg rename foo
19 test_expect_success
'Rename single top-most' '
25 test_expect_success
'Rename non-existing' '
26 command_error stg rename neithersuchpatch norsuchpatch
29 test_expect_success
'Rename with two arguments' '
35 test_expect_success
'Rename to existing name' '
36 command_error stg rename foo baz
39 test_expect_success
'Rename to same name' '
40 command_error stg rename foo foo
43 test_expect_success
'Rename top-most when others exist' '
47 test_expect_failure
'Rename hidden' '
51 test "$(echo $(stg series --all))" = "> foo ! pub"