chiark / gitweb /
Some clean-up of the branch manipulation commands
[stgit] / t / t1005-branch-delete.sh
CommitLineData
2bdde74e
KH
1#!/bin/sh
2
3test_description='Attempt to delete branches'
4
5. ./test-lib.sh
6
7stg init
8
9test_expect_success 'Create a branch (and switch to it)' '
10 stg branch --create foo
11 '
12
13test_expect_success 'Delete a branch' '
14 stg branch --delete master
15 '
16
ff432158
CM
17test_expect_success 'Create a non-StGIT branch and delete it' '
18 git branch bar &&
19 stg branch --delete bar
20 '
21
2bdde74e
KH
22test_expect_success 'Make sure the branch ref was deleted' '
23 [ -z "$(git show-ref | grep master | tee /dev/stderr)" ]
24 '
25
26test_expect_success 'Make sure the branch config was deleted' '
27 [ -z "$(git config -l | grep branch\\.master | tee /dev/stderr)" ]
28 '
29
30test_expect_success 'Make sure the branch files were deleted' '
31 [ -z "$(find .git -type f | grep master | tee /dev/stderr)" ]
32 '
33
34test_done