mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
fix(git): cherry-pick/revert tests actually pass now
This commit is contained in:
parent
da83ecee87
commit
1868e15137
|
@ -221,12 +221,12 @@ func TestGetGitHEADContextCherryPickOnTag(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetGitHEADContextRevertOnBranch(t *testing.T) {
|
func TestGetGitHEADContextRevertOnBranch(t *testing.T) {
|
||||||
want := "\uf0e2 pickme onto \ue0a0main"
|
want := "\uf0e2 012345 onto \ue0a0main"
|
||||||
context := &detachedContext{
|
context := &detachedContext{
|
||||||
currentCommit: "whatever",
|
currentCommit: "whatever",
|
||||||
branchName: "main",
|
branchName: "main",
|
||||||
revert: true,
|
revert: true,
|
||||||
revertSHA: "pickme",
|
revertSHA: "01234567",
|
||||||
}
|
}
|
||||||
g := setupHEADContextEnv(context)
|
g := setupHEADContextEnv(context)
|
||||||
got := g.getGitHEADContext("main")
|
got := g.getGitHEADContext("main")
|
||||||
|
@ -234,12 +234,12 @@ func TestGetGitHEADContextRevertOnBranch(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetGitHEADContextRevertOnTag(t *testing.T) {
|
func TestGetGitHEADContextRevertOnTag(t *testing.T) {
|
||||||
want := "\uf0e2 pickme onto \uf412v3.4.6"
|
want := "\uf0e2 012345 onto \uf412v3.4.6"
|
||||||
context := &detachedContext{
|
context := &detachedContext{
|
||||||
currentCommit: "whatever",
|
currentCommit: "whatever",
|
||||||
tagName: "v3.4.6",
|
tagName: "v3.4.6",
|
||||||
revert: true,
|
revert: true,
|
||||||
revertSHA: "pickme",
|
revertSHA: "01234567",
|
||||||
}
|
}
|
||||||
g := setupHEADContextEnv(context)
|
g := setupHEADContextEnv(context)
|
||||||
got := g.getGitHEADContext("")
|
got := g.getGitHEADContext("")
|
||||||
|
@ -265,7 +265,7 @@ func TestGetGitHEADContextSequencerCherryPickOnTag(t *testing.T) {
|
||||||
currentCommit: "whatever",
|
currentCommit: "whatever",
|
||||||
tagName: "v3.4.6",
|
tagName: "v3.4.6",
|
||||||
sequencer: true,
|
sequencer: true,
|
||||||
sequencerTodo: "pick pickme",
|
sequencerTodo: "pick pickme message\npick notme message",
|
||||||
}
|
}
|
||||||
g := setupHEADContextEnv(context)
|
g := setupHEADContextEnv(context)
|
||||||
got := g.getGitHEADContext("")
|
got := g.getGitHEADContext("")
|
||||||
|
@ -273,12 +273,12 @@ func TestGetGitHEADContextSequencerCherryPickOnTag(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetGitHEADContextSequencerRevertOnBranch(t *testing.T) {
|
func TestGetGitHEADContextSequencerRevertOnBranch(t *testing.T) {
|
||||||
want := "\ue29b pickme onto \ue0a0main"
|
want := "\uf0e2 012345 onto \ue0a0main"
|
||||||
context := &detachedContext{
|
context := &detachedContext{
|
||||||
currentCommit: "whatever",
|
currentCommit: "whatever",
|
||||||
branchName: "main",
|
branchName: "main",
|
||||||
sequencer: true,
|
sequencer: true,
|
||||||
sequencerTodo: "revert pickme",
|
sequencerTodo: "revert 01234567 message\nrevert notme message",
|
||||||
}
|
}
|
||||||
g := setupHEADContextEnv(context)
|
g := setupHEADContextEnv(context)
|
||||||
got := g.getGitHEADContext("main")
|
got := g.getGitHEADContext("main")
|
||||||
|
@ -286,12 +286,12 @@ func TestGetGitHEADContextSequencerRevertOnBranch(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetGitHEADContextSequencerRevertOnTag(t *testing.T) {
|
func TestGetGitHEADContextSequencerRevertOnTag(t *testing.T) {
|
||||||
want := "\ue29b pickme onto \uf412v3.4.6"
|
want := "\uf0e2 012345 onto \uf412v3.4.6"
|
||||||
context := &detachedContext{
|
context := &detachedContext{
|
||||||
currentCommit: "whatever",
|
currentCommit: "whatever",
|
||||||
tagName: "v3.4.6",
|
tagName: "v3.4.6",
|
||||||
sequencer: true,
|
sequencer: true,
|
||||||
sequencerTodo: "revert pickme",
|
sequencerTodo: "revert 01234567 message\nrevert notme message",
|
||||||
}
|
}
|
||||||
g := setupHEADContextEnv(context)
|
g := setupHEADContextEnv(context)
|
||||||
got := g.getGitHEADContext("")
|
got := g.getGitHEADContext("")
|
||||||
|
|
Loading…
Reference in a new issue