forked from lindell/multi-gitter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added --plain-output flag (lindell#378)
- Loading branch information
Showing
6 changed files
with
98 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -976,6 +976,53 @@ Repositories with a successful run: | |
}, | ||
}, | ||
|
||
{ | ||
name: "formats urls", | ||
vcCreate: func(t *testing.T) *vcmock.VersionController { | ||
return &vcmock.VersionController{ | ||
Repositories: []vcmock.Repository{ | ||
createRepo(t, "owner", "has-url", "i like apples"), | ||
}, | ||
} | ||
}, | ||
args: []string{ | ||
"run", | ||
"--author-name", "Test Author", | ||
"--author-email", "[email protected]", | ||
"-B", "custom-branch-name", | ||
"-m", "custom message", | ||
changerBinaryPath, | ||
}, | ||
verify: func(t *testing.T, vcMock *vcmock.VersionController, runData runData) { | ||
assert.Equal(t, "Repositories with a successful run:\n \x1b]8;;https://github.com/owner/has-url/pull/1\aowner/has-url #1\x1b]8;;\a\n", runData.out) | ||
}, | ||
}, | ||
|
||
{ | ||
name: "does not format urls when --plain-output is used", | ||
vcCreate: func(t *testing.T) *vcmock.VersionController { | ||
return &vcmock.VersionController{ | ||
Repositories: []vcmock.Repository{ | ||
createRepo(t, "owner", "has-url", "i like apples"), | ||
}, | ||
} | ||
}, | ||
args: []string{ | ||
"run", | ||
"--author-name", "Test Author", | ||
"--author-email", "[email protected]", | ||
"-B", "custom-branch-name", | ||
"-m", "custom message", | ||
"--plain-output", | ||
changerBinaryPath, | ||
}, | ||
verify: func(t *testing.T, vcMock *vcmock.VersionController, runData runData) { | ||
assert.Equal(t, `Repositories with a successful run: | ||
owner/has-url #1 | ||
`, runData.out) | ||
}, | ||
}, | ||
|
||
{ | ||
name: "same feature and base branch name", | ||
vcCreate: func(t *testing.T) *vcmock.VersionController { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters