gitignore: Add ChangeLog to .gitignore
[stgit.git] / t / t2900-rename.sh
blob32900d0a0852bf1887f677840078b222fdb64d41
1 #!/bin/sh
3 # Copyright (c) 2008 Onno Kortmann
4 # Parts taken from the other test scripts
5 # in this directory.
8 test_description='stg rename test
10 Tests some parts of the stg rename command.'
12 . ./test-lib.sh
13 stg init
15 test_expect_success 'Rename in empty' '
16 command_error stg rename foo
19 test_expect_success 'Rename single top-most' '
20 stg new -m foo &&
21 stg rename bar
23 # bar
25 test_expect_success 'Rename non-existing' '
26 command_error stg rename neithersuchpatch norsuchpatch
29 test_expect_success 'Rename with two arguments' '
30 stg new -m baz &&
31 stg rename bar foo
33 # foo,baz
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' '
44 stg rename bar
47 test_expect_failure 'Rename hidden' '
48 stg pop &&
49 stg hide bar &&
50 stg rename bar pub &&
51 test "$(echo $(stg series --all))" = "> foo ! pub"
54 test_done