Commit | Line | Data |
---|---|---|
a5f1eba2 YD |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2006 Yann Dirson | |
4 | # | |
5 | ||
6 | test_description='Branch renames. | |
7 | ||
8 | Exercises branch renaming commands. | |
9 | ' | |
10 | ||
11 | . ./test-lib.sh | |
12 | ||
13 | test_expect_success \ | |
14 | 'Create an stgit branch from scratch' \ | |
15 | 'stg init && | |
16 | stg branch -c foo && | |
17 | stg new p1 -m "p1" | |
18 | ' | |
19 | ||
5f594e90 | 20 | test_expect_success \ |
a5f1eba2 | 21 | 'Rename the current stgit branch' \ |
f03004e2 | 22 | 'command_error stg branch -r foo bar |
a5f1eba2 YD |
23 | ' |
24 | ||
25 | test_expect_success \ | |
26 | 'Rename an stgit branch' \ | |
27 | 'stg branch -c buz && | |
28 | stg branch -r foo bar && | |
262d31dc | 29 | [ -z $(find .git -type f | grep foo | tee /dev/stderr) ] && |
2b5f6f65 | 30 | test -z $(git config -l | grep branch\\.foo) |
a5f1eba2 YD |
31 | ' |
32 | ||
33 | test_done |