mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Change test to use named struct fields instead of positional fields
This makes the tests a little bit easier to read, the multi-line string literals make this otherwise a little difficult.
This commit is contained in:
parent
626ca18a23
commit
4b30bc6dd3
1 changed files with 12 additions and 12 deletions
|
@ -14,24 +14,24 @@ func TestCommitPrefixMigrations(t *testing.T) {
|
|||
expected string
|
||||
}{
|
||||
{
|
||||
"Empty String",
|
||||
"",
|
||||
"",
|
||||
name: "Empty String",
|
||||
input: "",
|
||||
expected: "",
|
||||
}, {
|
||||
"Single CommitPrefix Rename",
|
||||
`
|
||||
name: "Single CommitPrefix Rename",
|
||||
input: `
|
||||
git:
|
||||
commitPrefix:
|
||||
pattern: "^\\w+-\\w+.*"
|
||||
replace: '[JIRA $0] '`,
|
||||
`
|
||||
expected: `
|
||||
git:
|
||||
commitPrefix:
|
||||
- pattern: "^\\w+-\\w+.*"
|
||||
replace: '[JIRA $0] '`,
|
||||
}, {
|
||||
"Complicated CommitPrefixes Rename",
|
||||
`
|
||||
name: "Complicated CommitPrefixes Rename",
|
||||
input: `
|
||||
git:
|
||||
commitPrefixes:
|
||||
foo:
|
||||
|
@ -40,7 +40,7 @@ git:
|
|||
CrazyName!@#$^*&)_-)[[}{f{[]:
|
||||
pattern: "^foo.bar*"
|
||||
replace: '[FUN $0] '`,
|
||||
`
|
||||
expected: `
|
||||
git:
|
||||
commitPrefixes:
|
||||
foo:
|
||||
|
@ -50,9 +50,9 @@ git:
|
|||
- pattern: "^foo.bar*"
|
||||
replace: '[FUN $0] '`,
|
||||
}, {
|
||||
"Incomplete Configuration",
|
||||
"git:",
|
||||
"git:",
|
||||
name: "Incomplete Configuration",
|
||||
input: "git:",
|
||||
expected: "git:",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue