Skip to content

Commit

Permalink
test_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Spitfire1900 committed Dec 4, 2024
1 parent c4ac13b commit 856c4ad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_xontrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ def prompts(load_xontrib: abc.Callable[[str], None],
yield prompts


def test_branch(git_repo):
with cd(git_repo):
repo = Repo(git_repo).init()
repo.index.commit('initial commit')
repo.create_head('test_branch')
repo.git.checkout('test_branch')
assert PromptFormatter()('{pygitstatus.branch}') == '{CYAN}test_branch'


def test_clean(git_repo):
with cd(git_repo):
assert PromptFormatter()('{pygitstatus.clean}') == '{BOLD_GREEN}✓{RESET}'
Expand Down

0 comments on commit 856c4ad

Please sign in to comment.